How do I remove persistent old printers after removing the deployment GPO and manually uninstalling?

MattC91 31 Reputation points
2022-06-27T15:03:12.427+00:00

I'm in the process of implementing a new print server to replace our old 2008 print server (long overdue). The old printers are deployed across many servers and workstations (100+) with various Windows operating systems. We're trying to remove the old print server shares in order to avoid confusion, but in many cases the printers continue to appear despite having removed any associated deployment GPO's and many attempts to uninstall the printers from the client PCs.

Upon login, the printers just re-enumerate, which appears to be a result of many many registry keys containing the associated printer paths in both HKLM and HKCU.

The printers have been pushed over the course of several years by other admins using various methods including GPO deployment and pushprinterconnections.exe.
To further complicate matters, the printers also appear to be linked to the roaming profiles. So even when we are successful in removing printers for one user, they persist for others. We have many users, and deleting profiles isn't really an option.

So far I've attempted many things:
Manually uninstalling printers
Manually deleting associated registry keys
A GPO with action: Delete against each printer share
Powershell scripts to uninstall printers, but seemingly only remove a few registry keys with no visible affects.
Powershell scripts to remove registry keys containing the print server name (only managed to remove some, not all)
vbscripts which are supposed to remove printer connections at login or logoff

I've trawled the internet to find a solution but have had no success.
I'd be happy for someone to tell me I'm doing something stupid or missing something obvious if it provides a solution.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,099 questions
Windows Server Printing
Windows Server Printing
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Printing: Printer centralized deployment and management, scan and fax resources management, and document services
658 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Brad Goudey 0 Reputation points
    2023-04-18T17:06:21.8866667+00:00

    Howdy
    Old question but I am fighting the same thing.
    Supposedly in GPO there is a delete old printers preference but I can not find it yet and had removed the old ones from the Printer server incorrectly
    Found in Powershell
    get-printer (shows all printers and names
    $Printer = get-printer -name "\printserver\printername" 
    Remove-Printer -InputObject $Printer