Windows – Edit Printer configuration CLI

You can do various thing with prnmgr.vbs. Built-in VBS script since windows vista. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/prnmngr

Delete a Printer:

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -d -p "Send To OneNote 2013"\

Install Driver into Driver Store:

pnputil.exe -i -a \\bwl-dc-01\NETLOGON\BrotherPrintDriver\32_64\BRPRM13A.INF


Install Printer Driver into Print Store: 

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -m "Brother MFC-L2700DW series" -h "\\server\path-to-driver\BrotherPrintDriver\32_64" -i "\\server\path-to-driver\BrotherPrintDriver\32_64\BRPRM13A.INF"

For non-servers use ` rundll32 printui.dll PrintUIEntry`   https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ee624057(v=ws.10)?redirectedfrom=MSDN

Delete a Printer:

rundll32 printui.dll,PrintUIEntry /dl /n "Name of Printer"


Install a Printer Driver from INF:

rundll32 printui.dll,PrintUIEntry /ia /m "Name of Driver referenced in INF File" /K /h "3" /v "3" /f "Path\to\inf\file.inf"


Update printer driver:

rundll32 printui.dll,PrintUIEntry /Xs /n "Name of Printer" DriverName "Name of Driver referenced in INF File"


Add SMB printer for all users (per computer):

rundll32 printui.dll PrintUIEntry /ga /n\\print-server\SMASH

Leave a Reply