Computer and Software Support


Prnqctl.vbs

This page is from Microsoft

Updated: January 21, 2005

Prints a test page, pauses or resumes a printer, and clears a printer queue. Used without parameters, prnqctl.vbs displays command-line help for the prnqctl.vbs command.

To pause printing

 
Syntax
cscript prnqctl.vbs-z [-sRemoteComputer]-pPrinterName [-uUserName-wPassword]
Parameters
-z
Required. Specifies that you want to pause printing.
-sRemoteComputer
Specifies, by name, the remote computer to which the printer you want to pause is attached. If you do not specify a computer, the printer attached to the local computer is paused.
-pPrinterName
Required. Specifies, by name, the printer you want to pause.
-uUserName-wPassword
Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services to the computer that hosts the printer on which you want to pause printing. All members of the Administrators group for that computer have these permissions, but the permissions can also be granted to other users. If you do not specify an account, you must be logged on under an account with these permissions for the command to work. For more information about WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
  • This command starts a script that is located in the systemroot\system32 directory. You must type this command at a command prompt with that directory as the current directory, or you must type the full path to that directory at the beginning of the cscript command.
  • If the information that you supply contains spaces, use quotation marks around the text (for example, "Computer Name").
Examples
To pause all printing on the printer named ColorPrinter_2 hosted on the remote computer named HRServer, type:

cscript prnqctl.vbs -z -s HRServer -p ColorPrinter_2

Return to Top

 

To resume printing

 
Syntax
cscript prnqctl.vbs-m [-sRemoteComputer]-pPrinterName [-uUserName-wPassword]
Parameters
-m
Required. Specifies that you want to resume printing.
-sRemoteComputer
Specifies, by name, the remote computer to which the printer you want to resume is attached. If you do not specify a computer, the printer attached to the local computer is resumed.
-pPrinterName
Required. Specifies, by name, the printer on which you want to resume printing.
-uUserName-wPassword
Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services to the computer that manages the printer on which you want to resume printing. All members of the Administrators group for that computer have these permissions, but the permissions can also be granted to other users. If you do not specify an account, you must be logged on under an account with these permissions for the command to work. For more information about WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
  • This command starts a script that is located in the systemroot\system32 directory. You must type this command at a command prompt with that directory as the current directory, or you must type the full path to that directory at the beginning of the cscript command.
  • If the information that you supply contains spaces, use quotation marks around the text (for example, "Computer Name").
Examples
To resume all printing on the printer named ColorPrinter_2 hosted on the remote computer named HRServer, type:

cscript prnqctl.vbs -m -s HRServer -p ColorPrinter_2

Return to Top

 

To pause printing

 
Syntax
cscript prnqctl.vbs-z [-sRemoteComputer]-pPrinterName [-uUserName-wPassword]
Parameters
-z
Required. Specifies that you want to pause printing.
-sRemoteComputer
Specifies, by name, the remote computer to which the printer you want to pause is attached. If you do not specify a computer, the printer attached to the local computer is paused.
-pPrinterName
Required. Specifies, by name, the printer you want to pause.
-uUserName-wPassword
Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services to the computer that hosts the printer on which you want to pause printing. All members of the Administrators group for that computer have these permissions, but the permissions can also be granted to other users. If you do not specify an account, you must be logged on under an account with these permissions for the command to work. For more information about WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
  • This command starts a script that is located in the systemroot\system32 directory. You must type this command at a command prompt with that directory as the current directory, or you must type the full path to that directory at the beginning of the cscript command.
  • If the information that you supply contains spaces, use quotation marks around the text (for example, "Computer Name").
Examples
To pause all printing on the printer named ColorPrinter_2 hosted on the remote computer named HRServer, type:

cscript prnqctl.vbs -z -s HRServer -p ColorPrinter_2

Return to Top

 

To resume printing

 
Syntax
cscript prnqctl.vbs-m [-sRemoteComputer]-pPrinterName [-uUserName-wPassword]
Parameters
-m
Required. Specifies that you want to resume printing.
-sRemoteComputer
Specifies, by name, the remote computer to which the printer you want to resume is attached. If you do not specify a computer, the printer attached to the local computer is resumed.
-pPrinterName
Required. Specifies, by name, the printer on which you want to resume printing.
-uUserName-wPassword
Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services to the computer that manages the printer on which you want to resume printing. All members of the Administrators group for that computer have these permissions, but the permissions can also be granted to other users. If you do not specify an account, you must be logged on under an account with these permissions for the command to work. For more information about WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
  • This command starts a script that is located in the systemroot\system32 directory. You must type this command at a command prompt with that directory as the current directory, or you must type the full path to that directory at the beginning of the cscript command.
  • If the information that you supply contains spaces, use quotation marks around the text (for example, "Computer Name").
Examples
To resume all printing on the printer named ColorPrinter_2 hosted on the remote computer named HRServer, type:

cscript prnqctl.vbs -m -s HRServer -p ColorPrinter_2

Return to Top

 

To print a test page

 
Syntax
cscript prnqctl.vbs-e [-sRemoteComputer]-pPrinterName [-uUserName-wPassword]
Parameters
-e
Required. Specifies that you want to print a test page.
-sRemoteComputer
Specifies, by name, the remote computer to which the printer on which you want to print a test page is attached. If you do not specify a computer, the local computer is used.
-pPrinterName
Required. Specifies, by name, the printer on which you want to print a test page.
-uUserName-wPassword
Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services to the computer that manages the printer on which you want to print a test page. All members of the Administrators group for that computer have these permissions, but the permissions can also be granted to other users. If you do not specify an account, you must be logged on under an account with these permissions for the command to work. For more information about WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
  • This command starts a script that is located in the systemroot\system32 directory. You must type this command at a command prompt with that directory as the current directory, or you must type the full path to that directory at the beginning of the cscript command.
  • If the information that you supply contains spaces, use quotation marks around the text (for example, "Computer Name").

 

To cancel all jobs spooled to a printer

 
Syntax
cscript prnqctl.vbs-x [-sRemoteComputer] -pPrinterName [-uUserName-wPassword]
Parameters
-x
Required. Specifies that you want to cancel all jobs spooled to a printer.
-sRemoteComputer
Specifies, by name, the remote computer to which the printer for which you want to cancel all jobs is attached. If you do not specify a computer, the local computer is used.
-pPrinterName
Required. Specifies, by name, the printer for which you want to cancel all print jobs.
-uUserName-wPassword
Specifies an account with permissions to connect by using Windows Management Instrumentation (WMI) services to the computer on which you want to cancel all print jobs. All members of the Administrators group for that computer have these permissions, but the permissions can also be granted to other users. If you do not specify an account, you must be logged on under an account with these permissions for the command to work. For more information about WMI, see Related Topics.
/?
Displays help at the command prompt.
Remarks
  • This command starts a script that is located in the systemroot\system32 directory. You must type this command at a command prompt with that directory as the current directory, or you must type the full path to that directory at the beginning of the cscript command.
  • If the information that you supply contains spaces, use quotation marks around the text (for example, "Computer Name").

Return to Top

Formatting legend

Format Meaning
Italic Information that the user must supply
Bold Elements that the user must type exactly as shown
Ellipsis (...) Parameter that can be repeated several times in a command line
Between brackets ([]) Optional items
Between braces ({}); choices separated by pipe (|). Example: {even|odd} Set of choices from which the user must choose only one
Courier font Code or program output