Skip to content

Powershell – Remove old printer from Registry

Running into printers which should be deleted ages ago or causing all sorts of random issues like randomly appearing after deleting them, I think at some point we have all ran into that.
After a while I’ve found an article which guided me to a location in the registry where these guys were just hanging around, waiting to pop-up again. So I’ve created a script to deal with them.

First of all you do need PsExec (available on Microsoft Docs) since it is a SYSTEM protected location. Then execute Powershell ISE with the “PsExec.exe -s -i Powershell_ISE” command.

Then paste the following script and edit the ‘PrinterName’ variable;

That should be it!

Published inPowerShellServer 2016Windows Server

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *