How to get rid of pesky phantom printers and bad printer driversAlex Fields
I have performed server migrations for a lot of clients over the years, and honestly I don’t see this issue come up all that often. But when it does strike, so-called “phantom” printers, or removing printers whose drivers have “gone bad” can be one of the more annoying problems to troubleshoot–especially when you remove the printers, reboot the computer and they magically reappear again.* My process for resolving this type of “weirdness” can help you circumvent spending too much time troubleshooting those one or two workstations that just won’t let go of old (retired) printer shares, or new printer shares that are being wonky on a system or two.
- You have removed shared printers either manually or via a script/policy, but they still show up on workstations later on
- You have printer drivers that start misbehaving (sometimes coinciding with a migration)
- Example might be not displaying text/characters properly, or not printing correctly in some other way
- Garbled characters, wrong orientation, margin issues, printing from wrong tray, etc. when it used to work fine
In general, my approach to migrating printers can be reviewed here, where I describe removing legacy printer shares via a small logon script that removes each named printer as follows:
rundll32 printui.dll,PrintUIEntry /q /dn /n “\\OldServerName\SharedPrinterName”
Just repeat that line for every printer you want to remove. I usually publish the new printer shares via group policy using the Print Management console. It is a good idea to sweep through the existing GPO’s and startup scripts to make sure there aren’t any remaining references to the old printer shares, either.
If for some reason, workstations are still holding onto old printer shares (even when you’ve verified they are no longer published), and manually removing/deleting them is also unsuccessful, then you can “super-delete” them manually from stubborn workstations with this process:
- Open an administrative command prompt
- Type net stop spooler
- Now browse to C:\Windows\System32\spool\PRINTERS (you will need to click “Continue” to gain access to the folder)
- Delete the contents of this folder
- Return to the cmd prompt and type net start spooler and press enter
- Next type: printui /s /t2 and press enter
- Remove the driver and the package
Note that you can optionally remove ports associated with the printer as long as you’re in there, although I tend not to do this if the new printer has the same IP, for example, and is just shared out from a new server location. The above process is also effective in removing printers from workstations when they are generally misbehaving, such as printing odd-looking characters, or otherwise not being able to print properly. I usually find that removing them in this manner, and simply re-adding the printer from the server share afterward clears it right up.
*By the way, terms like “phantom” and “wonky” or similar (corrupted, weird, etc.)–these are just technical jargon terms for, “I don’t actually know why that happened.” Which is fine in some cases–as long as you can also say, “Here’s how we’re going to fix it.” The problem of course is, since there is no discernible root cause, how do you know it won’t happen again? I dunno, but we have this fix, and it seems to work okay. I don’t have an explanation for why this happens sometimes, but I have found these to be reasonably effective steps for remedying the problem.