Migrating Windows Print Server - Cleaning old printer installs

Jesse Sanchez 131 Reputation points
2021-05-04T15:57:38.37+00:00

Hello,

We are on a Windows Domain environment. We plan on removing our old print server and installing a new one with same printer drivers but new printer shared names.

I am having issues on the test phase of removing old network printers and installing new shared printers. Our environment has a combination of printers installed with a .vbs script objNetwork.AddWindowsPrinterConnection, manual installs by browsing to the printer network path and double clicking on printers, and some with using printui.exe /ga /q /n"\server\printer".

From the research I have gathered, the VBS and manual installs are done on a per user level and the printui.exe /ga installs it per computer. When I try to do uninstall per user with powershell or command prompt it will remove them but sometimes they get added back on because of the install if it was done per computer.

What is the best method to clean everything up first (per computers and per user) and then install new printer either with powershell, printui.exe, or group policy? I would do everything with group policy but from what I read, it will not uninstall printers that have not been added with GPOs.

Any help is appreciated.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,084 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
640 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jesse Sanchez 131 Reputation points
    2021-05-05T16:59:06.177+00:00

    UPDATE:

    After heavy testing, GPO would not delete printers not installed with a GPO so delete printers was not working on our case. Also printers were coming back because for some users they were installed as per computer and using commands below I remove them by computer first and any remaining by user.

    Solution: Using PDQ Deploy and all below are command prompt steps that can run from PDQ.

    Uninstall network printers per machine for old server using command (Run as deploy user(interactive): %WINDIR%\system32\Printui.exe /gd /q /n"\OLDPrintserver\Printer1"

    Uninstall network printers per machine for new server using command: (Run as deploy user (interactive):%WINDIR%\system32\Printui.exe /gd /q /n"\NewPrintserver\Printer1"

    Uninstall network printers per user using command (Run as logged on user):wmic printer where "Local='FALSE'" delete

    Install new network printers per machine (this works better in our case, run as Deploy user (interactive) %WINDIR%\system32\Printui.exe /ga /q /n"\newprintserver\Printer1"

    STOP / Start Spooler with 60 second pause so printers show up

    Set Default PrinterRUNDLL32 PRINTUI.DLL,PrintUIEntry /q /y /n "\newprintserver\printer1"

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-05-05T12:08:48.307+00:00

    Hi,

    For better clarity and to assist you better I would require more information regarding this:

    1. Please provide your Windows OS version both of client and server in your environment.
    2. Please provide the type of your printer, such as network printer, USB printer, shared printer etc.
    3. Please provide the model of the printer.
    4. Did you use logon script policy to install printers to local client computer?
    5. Could you please share the VBS script that was used for printing on client computer? So that I can reproduce your issue.

    Best regards

    0 comments No comments