System command

prndrvr command

Adds, deletes, and lists printer drivers. This guide lists the documented syntax and parameters for prndrvr; 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 prndrvr {-a | -d | -l | -x | -?} [-m <model>] [-v {0|1|2|3}] [-e <environment>] [-s <Servername>] [-u <Username>] [-w <password>] [-h <path>] [-i <inf file>]

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

Syntax pattern

Syntax pattern from Microsoft Learn; replace placeholders and choose only one documented alternative before use.

cscript prndrvr {-a | -d | -l | -x | -?} [-m <model>] [-v {0|1|2|3}] [-e <environment>] [-s <Servername>] [-u <Username>] [-w <password>] [-h <path>] [-i <inf file>]

Parameters, options and clauses

Option / clauseDescription
-a / -dInstall or delete a printer driver.
-lList printer drivers on the selected server, or on the local computer by default.
-xDelete unused printer drivers that are not referenced by a logical printer.
-m <model>Select the driver model name to install.
-v {0|1|2|3}Choose the driver version; the default matches the local Windows version.
-e <environment>Choose a supported driver environment, such as Windows NT x86, Windows x64 or Windows IA64.
-s <Servername>Manage drivers on a remote print server; omit to use the local computer.
-u <Username> -w <password>Provide credentials authorized to manage the target computer. Avoid exposing passwords in shell history.
-h <path>Specify the driver file location; by default the Windows installation path is used.
-i <inf file>Specify the full path to the driver INF file.
-?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