Freigeben über


Managing printing from the command line

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Managing printing from the command line

You can manage your printers at the command line by using:

  • Print to print a text file or to display the contents of a print queue.

  • Net print to display or control print jobs and printer queues.

  • Net start spooler to start the Spooler service.

  • Lpr to print a file to a computer running an LPD server.

  • Lpq to obtain status of a print queue on a computer running the LPD server.

You can obtain additional functionality through scripts by using:

  • Prncnfg.vbs to get and set printer configurations, or to rename a printer.

  • Prndrvr.vbs to add, delete, and list printer drivers.

  • Prnjobs.vbs to pause, resume, cancel, and list print jobs.

  • Prnqctl.vbs to print a test page, pause or resume a printer, and clear a printer queue.

  • Prnmngr.vbs to add, delete, and list printer connections. Prnmngr.vbs can also be used for obtaining and setting the default printer.

  • Prnport.vbs to add, delete, and list standard TCP/IP ports. Prnport.vbs can also be used to obtain and set the port configuration.

For information about other command-line utilities, see Command-line reference A-Z. For more information about manageability, see Management Strategies and Tools. For more information about printing, see Printing.