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:

  1. The print command in Windows
  2. The net print command in Windows
  3. Netcfg command in Windows
  4. Nbtstat command in Windows
5 ★ | 1 Vote

May be interested

  • Comp command in WindowsPhoto of Comp command in Windows
    the comp command compares the content of two files or gathers files in bytes. if used without parameters, the comp command will prompt you to enter files for comparison.
  • The convert in Windows commandPhoto of The convert in Windows command
    the convert command converts file allocation table (fat) and fat32 to the ntfs file system, keeping existing files and folders intact. the drives that have been converted to ntfs file systems cannot be converted to fat or fat32 anymore.
  • Prnport command in WindowsPhoto of Prnport command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
  • Compact command in WindowsPhoto of Compact command in Windows
    the compact command displays or changes the process of compressing files or folders on an ntfs partition. if used without parameters, the compact command displays the compression status of the current directory and the files contained therein.
  • Cscript command in WindowsPhoto of Cscript command in Windows
    the cscript command starts a script to run in the command line environment.
  • How to register IOE online English exam on computerPhoto of How to register IOE online English exam on computer
    creating an ioe account is the same as how to sign up for facebook, create a zalo account, ... the steps are quite easy, but for those who are not too familiar with the technology, it is not easy. therefore, the network administrator will provide detailed instructions on how to register an ioe account so that you can quickly take the english exam online.