[-p] [-m] [-r] [-u]
[-w]
Command parameter prnmngr
Parameters
Describe
-a
Add a local printer connection.
-d
Delete printer connection.
-x
Delete all printers in the server specified by the -s parameter.If you do not specify a specific server, Windows will delete all printers on the local computer by default.
-g
Show default printer.
-t
Set the default printer to the printer specified by the -p parameter.
-l
Lists all printers installed on the server specified by the -s parameter.If you do not specify a specific server, Windows will list the printers installed on the local computer.
c
Specify parameters to apply to printer connections.Can be used with -a and -x parameters.
-S
Specify the name of the remote computer that the printer store you want to manage.If you do not specify a computer, the local computer will be used.
-p
Specify the name of the printer you want to manage.
-m
Specify (by name) the driver you want to install.Drivers are usually named after the type of printer they support.Please review the printer's documentation for more details.
-r
Specify the port where the printer is connected.If this is a parallel port or serial port, use that port's ID (eg LPT1: or COM1 :).If this is a TCP / IP port, use the specified port name when the port is added.
-u -w
Specify an account that has the right to connect to the printer storage computer that you want to manage.All members in the local administrator group of the specified computer have these rights, but the permissions can also be granted to other users.If you do not specify an account, you must log in to an account with these permissions so that the command can be executed.
/?
Show help at thecommand prompt.
Command statement prnmngr
The prnmngr command is a Visual Basic script located in the % WINdir% System32printing_Admin_Scripts directory. To use this command, at the command prompt, type cscript followed by the full path to the prnmngr file, or change the directory to the appropriate directory.
cscript% WINdir% System32printing_Admin_Scriptsen-USprnmngr
If the information you provide contains spaces, use quotation marks for the text (for example, "computer Name").
For example, prnmngr command
To add a printer named colorprinter_2 connected to LPT1 on the local computer, and ask the printer driver named color printer Driver1 , enter:
cscript prnmngr -a -p colorprinter_2 -m "color printer Driver1" -r lpt1:
To delete a printer named colorprinter_2 from a remote computer named HRServer , enter:
cscript prnmngr -d -s HRServer -p colorprinter_2
See more: