Fixing 'This device is currently being shared' (0x000008cc) error
That error shows up when you try to remove a shared printer or drive that's still in use. The fix is to stop sharing first.
You're in the Printers & Scanners settings, or maybe Device Manager, trying to remove a printer or a mapped drive. You click Remove, and instead of it just disappearing, you get that red error: This device is currently being shared. The exact error code is 0x000008cc.
I see this most often when someone's trying to clean up an old printer that was shared out from a Windows 10 or 11 workstation to a small office. Had a client last month whose whole print queue died because they deleted a printer port without unsharing first—then every machine that still had that printer mapped got spooler crashes. The real trigger: Windows won't let you delete any device—printer, drive, or USB hub—while it's marked as shared in Network & Sharing Center or the Print Management console.
Why this happens
Windows keeps a flag on any device that's been shared over the network. That flag lives in the registry under Printers or LanmanServer shares. When you try to remove the device, the system checks: 'Is this still shared?' If yes, it blocks the deletion. The thinking is someone else on the network might be using it right now. It's not malicious—it's just overly cautious.
Nine times out of ten, you haven't actually turned off sharing for that device. You might have disabled file and printer sharing globally, but that doesn't clear the per-device share flag. You have to explicitly unshare that specific device.
How to fix it
Step 1: Unshare the device
For a printer: Go to Settings > Bluetooth & devices > Printers & scanners. Click the printer, then click Printer properties. Go to the Sharing tab. Uncheck 'Share this printer.' Click Apply, then OK.
For a drive or folder: Right-click the drive in File Explorer, go to Properties, then the Sharing tab. Click 'Stop sharing' or 'Advanced Sharing' and uncheck 'Share this folder.'
Step 2: Verify the share is gone
Open Command Prompt as admin and run this:
net share
If the printer or drive still shows up in the list, the unshare didn't take. That sometimes happens if you had multiple printers with the same name or a stale share entry. Reboot, then check again.
Step 3: Remove the device
Now go back and try deleting the device. It should work. If it doesn't, move to the advanced steps.
If the standard fix doesn't work
Sometimes the share flag is stuck in the registry. Here's the manual way:
- Open Regedit as admin.
- Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers. - Find the subkey for your printer (look for the printer name).
- Delete that subkey entirely. Yes, delete the whole thing. Windows will recreate it when you re-add the printer.
- Close Regedit, reboot.
For shared drives, the share info lives here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
Delete the entry for the drive. Be careful—don't delete system shares like ADMIN$, C$, or IPC$.
Still stuck? Use PowerShell
If the registry isn't cooperating, use PowerShell to force-remove the printer:
Get-Printer | Where-Object { $_.Shared -eq $true } | Format-Table Name, Shared,
Remove-Printer -Name "Your Printer Name"
That removes the shared flag and the printer in one shot. For a drive:
Remove-SmbShare -Name "YourShareName" -Force
What to check if it still fails
If none of the above works, you're likely dealing with a corrupt spooler or a dead SMB share. Check these:
- Print Spooler service: Run
services.msc, find Print Spooler, stop it, delete everything fromC:\Windows\System32\spool\PRINTERS, then restart the service. Then try the removal again. - Network location: Make sure your network profile isn't set to Public. Private or Domain profiles allow sharing—switch to Public temporarily, reboot, then remove the device. Public blocks all sharing.
- Third-party backup software: Had a client whose backup software (Acronis) kept re-sharing a drive every time they tried to unshare it. Disabling the backup service temporarily let them remove the share permanently.
- Group Policy: If you're on a domain, your admin might have deployed a policy that publishes the printer to Active Directory. Check
gpresult /h results.htmlfor any printer deployment policies.
Last resort: boot into Safe Mode with Networking. That strips out most third-party services and lets you unshare and delete without interference. Works every time for me.
Was this solution helpful?