Get-PrinterDriver

Retrieve the list of printer drivers installed on a specified computer.

Syntax
 Get-PrinterDriver [[-Name] String[]]
 [-PrinterEnvironment String[]] [-ComputerName String]
 [-CimSession CimSession[]] [-ThrottleLimit Int32]
 [-AsJob] [CommonParameters ]
Key
 -Name 
 The name of the printer driver to retrieve.
 -AsJob
 Run the cmdlet as a background job.
 Use this parameter to run commands that take a long time to complete.
 -CimSession
 Run the cmdlet in a remote session or on a remote computer. Enter a computer name or
 a session object, such as the output of a New-CimSession or Get-CimSession cmdlet.
 The default is the current session on the local computer.
 -ComputerName
 The name of the computer from which to retrieve the printer drivers.
 -PrinterEnvironment
 The printer driver environment.
 -ThrottleLimit
 The maximum number of concurrent operations that can be established to run the cmdlet.
 If this parameter is omitted or a value of 0 is entered, then PowerShell calculates an
 optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running
 on the computer.
 The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Standard Aliases for Get-PrinterDriver:

Get-PrinterDriver retrieves the list of printer drivers installed on the specified computer. The Get-PrinterDriver cmdlet returns a printer driver object that you can store in a variable to use with other cmdlets.

You can specify the -ComputerName parameter to list the printer drivers installed on another computer.
You can use wildcard characters with Get-PrinterDriver.
You can use Get-PrinterDriver in a Windows PowerShell remoting session.
You do not need administrator credentials to run Get-PrinterDriver.

Examples

Get a list of printer drivers using a wildcard:

PS C:\> Get-PrinterDriver -Name *

Get a list of printer drivers on a remote computer:

PS C:\> Get-PrinterDriver -Name * -ComputerName "PrintServer2"

Get detailed information about each driver:

PS C:\> Get-PrinterDriver -Name "Microsoft XPS Document Writer" | Format-List

Get a printer driver object:

PS C:\> $PrinterDriver = Get-PrinterDriver -Name "KX Universal Printer Driver"

Backup all the files from an already installed printer driver [via SuperUser]:

$PrinterName = "Printer64"
$DriverBackupLocation = "c:\DriverBackup\$PrinterName"
mkdir $DriverBackupLocation
$Printer = Get-Printer $PrinterName | Select *
$PrinterDriver = Get-PrinterDriver $Printer.DriverName | Select *
Copy-Item -path ($PrinterDriver.InfPath | Split-Path -Parent) -Destination $DriverBackupLocation -Recurse

"I always think you can tell a lot about a person by how they talk to their cab driver" ~ Jeremy Strong.

Related PowerShell Cmdlets

Add-PrinterDriver - Install a printer driver on the computer.
Get-Printer - Retrieve a list of printers installed on a computer.
Get-PrintJob - Retrieve a list of print jobs from the specified printer.
Get-PrinterPort - Retrieve a list of printer ports.
DISM /online /export-driver - Export a list of Drivers.

(追記) (追記ここまで)
Copyright © 1999-2026 SS64.com
Some rights reserved

AltStyle によって変換されたページ (->オリジナル) /