Get-PrintConfiguration
Get-PrintConfiguration
Gets the configuration information of a printer.
Sintaxis
Parameter Set: PrinterName
Get-PrintConfiguration [-PrinterName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: PrinterObject
Get-PrintConfiguration [-PrinterObject] <CimInstance> [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Descripción detallada
The Get-PrintConfiguration cmdlet gets the configuration information of the specified printer. Using Get-PrintConfiguration cmdlet, you can manage the configuration of the following features:
● Collate
● Color
● Duplexing Mode
● N-Up
● Paper Size
You cannot use wildcard characters with Get-PrintConfiguration. You can use Get-PrintConfiguration in a Windows PowerShell remoting session.
You do not need administrator privileges to use Get-PrintConfiguration.
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 configuration information.
Alias |
Computer,CN |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PrinterName<String>
Specifies the name of the printer from which to retrieve the configuration information.
Alias |
PN |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-PrinterObject<CimInstance>
Specifies the object which contains the printer from which to retrieve configuration information.
Alias |
Printer |
¿Requerido? |
true |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByValue, ByPropertyName) |
¿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.
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_Printer
This cmdlet accepts one printer object.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#MSFT_PrinterConfiguration
This cmdlet returns a printer configuration object.
Ejemplos
Example 1: Get the printer configuration
This command returns the printer configuration for the printer named "Microsoft XPS Document Writer".
PS C:\> Get-PrintConfiguration –PrinterName "Microsoft XPS Document Writer"
Example 2: Get the print configuration for all printers
This command gets all the printers into a variable $printers and then loops through all the printers and displays the properties.
PS C:\> $printers = get-printer * foreach ($printer in $printers){ Get-printconfiguration –printerName $printer.name –duplexingMode “TwoSidedLongEdge”}