Prnmngr command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
The prnmngr command is used to add, delete and list printers or connect the printer, in addition to installing and displaying the default printer.
Syntax command prnmngr
cscript Prnmngr {-a | -d | -x | -g | -t | -l | -?} [c] [-s]
[-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:
- The print command in Windows
- The net print command in Windows
- Netcfg command in Windows
- Nbtstat command in Windows
You should read it
May be interested
- Instructions for using Command Promptdeep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
- Rd command in Windowsthe rd command helps delete a directory
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- How to use the command history function in Command Promptcommand prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
- The sfc command in Windows(applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
- Reg command copy in Windowsto copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
- Fc command in Windowsthe fc command compares two files or a collection of files and displays the differences between them.
- The echo command in Windowsthe echo command displays the message or turns on / off the command repeat feature. if used without parameters, the echo command will display the current echo setting.
- Xcopy command in Windowsthe xcopy command is a command prompt command used to copy one or more files or folders from one location to another. with many options and the ability to copy entire directories, the xcopy command is similar to, but much more powerful, than the copy command.
- The cacls command in Windowsthe cacls command displays or modifies an arbitrary access control list (dacl) on the specified file. the command applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012.