Home NT Commands
NT Syntax

PRNMNGR (XP and .Net)

Display, add, remove or set default printer.

Syntax
      PRNMNGR [-options] [-s server][-p printer_name][-m driver model]
[-r port][-u user_name][-w password]
Options
-l list printers -a add local printer -ac add printer connection -g get the default printer -t set the default printer -d delete printer -x delete all printers Examples:
prnmngr -a -p "printer" -m "driver" -r "lpt1:" prnmngr -d -p "printer" -s server prnmngr -ac -p "\\server\printer" prnmngr -d -p "\\server\printer" prnmngr -x -s server prnmngr -l -s server prnmngr -g prnmngr -t -p "\\server\printer"

To list printer connections
c:> prnmngr -l |find "Printer name"
Printer name MyLocalPrinter
Printer name \\MyServer\MyPrinter
Printer name \\MyServer\ANOtherPrinter

Related Commands:

CON2PRT
- Connect or disconnect a Printer
NET VIEW \\Printserver - to view a list of available printers
NET PRINT - View and Delete print jobs
PRNCNFG - Add, delete, or list printers / connections, set the default printer.
PRNDRVR - Add, delete or list printer drivers.
PRNJOBS - Pause, resume, cancel, or list print jobs
PRNPORT - Create, delete, or list TCP/IP printer ports, change port configuration.
PRNQCTL - Print a test page, pause or resume a printer, clear a printer queue.
PRINT - Print a text file
RUNDLL32 - Install/Remove Printers (plus advanced options)
WMIC PRINTER - Set printing options through WMI.
Q246868 - New TCP/IP Printing Options in the Windows Standard Port Monitor

WSH Commands:
Add printer - .AddPrinterConnection
Add Network printer - .AddWindowsPrinterConnection
List printers - .EnumPrinterConnections
Set default printer - .SetDefaultPrinter

Equivalent Linux BASH commands:

lpc - Line printer control program
lpr - Off line print
lprint - Print a file
lprintd - Abort a print job
lprintq - List the print queue
lprm - Remove jobs from the print queue



Simon Sheppard
SS64.com