prnqctl | new in WS2003 |
Clears a print queue, prints a test page, and pauses/resumes a printer.
prnqctl -e -m -x -z [-s RemoteComputer ] -p PrinterName
Prints a test page
Resumes a printer
Cancels all jobs in a print queue
Pauses a printer
Name of print server
Name of printer
Pause the SalesPrinter printer on the local computer:
prnqctl -z -p SalesPrinter Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Success Pause Printer SalesPrinter
Resume the printer:
prnqctl -m -p SalesPrinter Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Success Resume Printer SalesPrinter
Clear the print queue of all jobs:
prnqctl -x -p SalesPrinter Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Success Purge Printer SalesPrinter
Use prnjobs to verify the queue is empty:
prnjobs -l -p SalesPrinter Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Number of print jobs enumerated 0
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.
It may take a few seconds for the last job to clear when using the -x switch. Don't run the prnqctl -x command again before the queue is cleared or a printing error may result and the final job may be stuck in the queue.
Printing , prncnfg , prndrvr , prnjobs , prnmngr