PRNQCTL.vbs

Print a test page, pause or resume a printer, clear a printer queue.

Syntax
      cscript PRNQCTL.vbs [-options] [-s server] [-p printer] [-u user_name] [-w password]

Options

   -e   Print a test page
   -m   Resume the printer
   -p   Printer name
   -s   Server Name
   -u   User Name
   -w   password
   -x   Purge the printer (cancel all jobs)
   -z   Pause the printer
   -?   Display help

PrnQctl.vbs is not on the Windows PATH but will be found at:
%Windir%\System32\Printing_Admin_Scripts\locale\prnmngr.vbs

Examples

Set _scripts=cscript %Windir%\System32\Printing_Admin_Scripts\en-US

Print a test page on the LaserPrinter1 printer shared by the \\prnserv64 computer :
%_scripts%\Prnqctl.vbs -e -s prnserv64 -p LaserPrinter1

Pause printing on the LaserPrinter1 printer on the local computer:
%_scripts%\Prnqctl.vbs -z -p LaserPrinter1

Cancel all print jobs on the LaserPrinter1 printer on the local computer:
%_scripts%\Prnqctl.vbs -x -p LaserPrinter1

“ If the highest aim of a captain were to preserve his ship, he would keep it in port forever” ~ Thomas Aquinas

Related commands:

NET VIEW \\Printserver - to view a list of available printers.
NET PRINT - View and Delete print jobs.
PRNCNFG - Configure a printer.
PRNDRVR - Add, delete or list printer drivers.
PRNJOBS - Pause, resume, cancel, or list print jobs.
PRNMNGR - Add, delete or list printer drivers.
PRNPORT - Manage TCP/IP printer ports, change port configuration.
PRINT - Print a text file.
RUNDLL32 - Install/Remove Printers (plus advanced options).
WMIC PRINTER - Set printing options through WMI.
Q246868 - TCP/IP Printing options in the Windows Standard Port Monitor.
Add printer - .AddPrinterConnection
Add Network printer - .AddWindowsPrinterConnection
List printers - .EnumPrinterConnections
Set default printer - .SetDefaultPrinter
Equivalent bash command (Linux): lpc - Line printer control program.


 
Copyright © 1999-2021 SS64.com
Some rights reserved