[-p] [-j] [-u] [-w]
The prnjobs command parameter
Parameters
Describe
-z
Pause the print job (job) specified by the -j parameter.
-m
Continue the print job specified by the -j parameter.
-x
Cancel the print job specified by the -j parameter.
-l
Lists all print jobs in a print queue.
-S
Specify the name of the remote computer that the printer store you want to manage.If you do not specify a remote computer, the local computer will be used by default.
-p
Required parameters.Specify the name of the printer you want to manage.
-j
Specify (by ID number) the print job you want to cancel.
-u -w
Specify an account that has the right to connect to the printer storage computer that you want to manage.These rights are granted to all members in the local administrator group of the target computer, but the permissions can also be granted to other users.If you do not specify a specific account, you must log in to an account provided with these permissions to execute the command.
/?
Show help at the command prompt.
Prnjobs command
The prnjobs command is a Visual Basic script located in the% WINdir% System32printing_Admin_Scripts directory.To use this command, at the command prompt, type cscript followed by the full path to the prnjobs file or change the directory to the appropriate directory.For example:
cscript% WINdir% System32printing_Admin_Scriptsen-USprnjobs
If the information you provide contains spaces, use quotation marks around that piece of information (for example, "Computer name").
Example of prnjobs command
To pause the print job with the command ID of 27 sent to the remote computer with the HRServer name to print on the printer named colorprinter , enter:
cscript prnjobs -z -s HRServer -p colorprinter -j 27
To list all the current print jobs in the local printer queue named colorprinter_2 , enter:
cscript prnjobs -l -p colorprinter_2
See more: