Get-PrinterDriver
Get-PrinterDriver
Retrieves the list of printer drivers installed on the specified computer.
Sintaxis
Parameter Set: Query (cdxml)
Get-PrinterDriver [[-Name] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PrinterEnvironment <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Descripción detallada
The Get-PrinterDriver cmdlet 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 use 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 privileges to use Get-PrinterDriver.
Parámetros
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-ComputerName<String>
Specifies the name of the computer from which to retrieve the printer drivers.
Alias |
CN |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Name<String[]>
Specifies the name of the printer driver to retrieve.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PrinterEnvironment<String[]>
Specifies the printer driver environment.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
None
This cmdlet accepts no input objects.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_PrinterDriver
This cmdlet returns one or more printer driver objects.
Ejemplos
Example 1: Get a list of printer drivers using wildcard characters
This command returns a list of printer drivers installed on the local computer using wildcard characters.
PS C:\> Get-PrinterDriver *
Example 2: Get a list of printer drivers on a remote computer
This command retrieves a list of printer drivers from the computer named printServer.
PS C:\> Get-PrinterDriver * -ComputerName printServer
Example 3: Get detailed information of each driver
Get-PrinterDriver displays a summarized view of each printer driver queried.
The following command displays the detailed information for each printer driver.
PS C:\> Get-PrinterDriver –Name "Microsoft XPS Document Writer" | Format-List
Example 4: Get a printer driver object
This command retrieves a printer driver object that you can use with other cmdlets. The printer driver object is stored in the $PrinterDriver variable.
PS C:\> $PrinterDriver = Get-PrinterDriver –Name "Microsoft XPS Document Writer v4"