System command

prnjobs command

Pauses, resumes, cancels, and lists print jobs. This guide lists the documented syntax and parameters for prnjobs; check Microsoft Learn for version, role and execution-context requirements.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

cscript prnjobs {-z | -m | -x | -l | -?} [-s <Servername>] [-p <Printername>] [-j <JobID>] [-u <Username>] [-w <password>]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

cscript prnjobs.vbs -z -s HRServer -p colorprinter -j 27

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

cscript prnjobs.vbs -l -p colorprinter_2

Parameters, options and clauses

Option / clauseDescription
-z / -m / -xPause, resume or cancel the print job selected by -j.
-lList jobs in a print queue.
-s <Servername>Manage a printer on a remote computer; omit to use the local computer.
-p <Printername>Select the printer queue; required by the documented operation.
-j <JobID>Select a print job by its numeric job ID.
-u <Username> -w <password>Provide credentials authorized to manage the print server. Avoid exposing passwords in shell history.
-?Display command help.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory