There are several ways of mapping printers in Windows with more or less end-user interaction. The easiest method is to configure them in the client computers is via GPO, or, making them available to users in AD.
There are some scenarios where a manual override is necessary, for example when corporate visitors come or external consultants need to print.
The PrintUIEntry keyword is case sensitive, and you must enter the syntax for this command with the exact capitalization shown in the examples in this topic.
Life can be made easier by using:
rundll32 printui.dll,PrintUIEntry
To see all the sub-commands open CMD and type it in.
rundll32 printui.dll,PrintUIEntry /in /q /n\\server-name\printer-name
This installs the printer quietly.
rundll32 printui.dll,PrintUIEntry /dn /q /n\\server-name\printer-name
Deletes the printer mapping in the client computer.
rundll32 printui.dll,PrintUIEntry /y /n\\server-name\printer-name
Set the printer as default.
rundll32 printui.dll,PrintUIEntry /k /n\\server-name\printer-name
Prints a test page. This command can be useful as well, if all printers at particular location need to tested at the same time.
rundll32 printui.dll PrintUIEntry /s /t1 /c\\server-name
To see the print server settings.
rundll32 printui.dll PrintUIEntry /p /n\\server-name\printer-name
Shows the printer properties.