System command

prnqctl command

Prints a test page, pauses or resumes a printer, and clears a printer queue. This guide lists the documented syntax and parameters for prnqctl; 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 Prnqctl {-z | -m | -e | -x | -?} [-s <Servername>] [-p <Printername>] [-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 prnqctl -e -s Server1 -p Laserprinter1

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

cscript prnqctl -z -p Laserprinter1

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

cscript prnqctl -x -p Laserprinter1

Parameters, options and clauses

Option / clauseDescription
-z / -mPause or resume printing on the selected printer.
-ePrint a test page.
-xCancel all print jobs for the selected printer.
-s <Servername>Manage a printer on a remote computer; omit to use the local computer.
-p <Printername>Select the printer; required for the documented operations.
-u <Username> -w <password>Provide credentials authorized to manage the target computer. 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