prnmngr | new in WS2003 |
Manages printers.
prnmngr -a [-s RemoteComputer ] -p PrinterName -m DriverName -r PortName prnmngr -d [-s RemoteComputer ] -p PrinterName prnmngr {-l -x} [-s RemoteComputer ] prnmngr {-ac -t} -p PrinterName prnmngr -g
Adds a local printer
Deletes a printer
Lists all printers
Deletes all printers
Adds a printer connection
Specifies the default printer
Displays the default printer
Name of print server
Name of printer
Name of printer driver
COM, LPT, or TCP/IP port of printer
List all printers on the local computer:
prnmngr -l Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Server name Printer name HP LaserJet 1200 Series PCL 6 on dizzy (from SNOOPY) in session 1 Share name Driver name HP LaserJet 1200 Series PCL 6 Port name TS005 Comment Location Print processor WinPrint Data type RAW Parameters Attributes 33348 Priority 1 Default priority 0 Average pages per minute 0 Printer status Idle Extended printer status Unknown Detected error state Unknown Extended detected error state Unknown Server name Printer name SalesPrinter Share name SPRT Driver name HP Color LaserJet Port name LPT1: Comment Location Print processor WinPrint Data type RAW Parameters Attributes 2632 Priority 1 Default priority 0 Average pages per minute 0 Printer status Idle Extended printer status Unknown Detected error state Unknown Extended detected error state Unknown Number of local printers and connections enumerated 2
Display the default printer:
prnmngr -g Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. The default printer is HP LaserJet 1200 Series PCL 6 on dizzy (from SNOOPY) in session 1
Change the default printer to SalesPrinter :
prnmngr -t -p SalesPrinter Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. The default printer is now SalesPrinter
This command is a .vbs script and requires CScript to run. You can make CScript your default script host by typing the following at the command prompt:
cscript //h:cscript //s
This command requires Administrator credentials. If logged on with different credentials, use -u UserName -w Password to specify suitable credentials.
Printing , prncnfg , prndrvr , prnjobs , prnqctl