How to manage print jobs from the command line and today we are going to share here how to manage the printer jobs using WMI command and also learn about how to delete, and resume the paused jobs.
How to Manage Print Jobs from Command Line
At first, you need to run the below command for the list of jobs we have in the queues.
wmic printjob get
The above command shows you the list of the jobs in progress/queue. But if you want to be interested to print only the minimal info- just use the below command.
wmic printjob get jobid, document, jobstatus
How to Run Command for Remote Desktop (RDP Client)
Example:
c:\>wmic printjob get jobid, document, jobstatus Document JobId JobStatus BankStatement 2 Error/Restart
How to cancel a print job:
If you want to cancel the print job and you need to provide the job id and use to below command.
wmic printjob where jobid=<jobnumber> delete
Example:
wmic printjob where jobid=2 delete
How to fix System error 5 has occurred
How to pause a print job:
Just need to use the below command and used to specify the job id.
wmic printjob where jobid=<jobnumber> pause
Example:
c:\>wmic printjob where jobid=2 pause Executing (\\WINCMD-PC\ROOT\CIMV2:Win32_PrintJob.Name="Myprinter, 2")->Pause() Method execution successful. Out Parameters: instance of __PARAMETERS { ReturnValue = 0; }; c:\>wmic printjob get jobid, document, jobstatus Document JobId JobStatus BankStatement 2 Paused
How to resume a paused print job: (use the below command)
wmic printjob where jobid=<jobnumber> resume