Get-PrintConfiguration
Get-PrintConfiguration
Gets the configuration information of a printer.
Syntaxe
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>]
Description détaillée
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.
Paramètres
-AsJob
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-CimSession<CimSession[]>
Exécute l’applet de commande dans une session à distance ou sur un ordinateur distant. Entrez un nom d’ordinateur ou un objet de session, comme la sortie d’une applet de commande New-CimSession ou Get-CimSession. La valeur par défaut est la session active sur l’ordinateur local.
Alias |
Session |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
-ComputerName<String>
Specifies the name of the computer from which to retrieve the printer configuration information.
Alias |
Computer,CN |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue, ByPropertyName) |
Accepter les caractères génériques ? |
false |
-PrinterName<String>
Specifies the name of the printer from which to retrieve the configuration information.
Alias |
PN |
Obligatoire ? |
true |
Position ? |
1 |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue, ByPropertyName) |
Accepter les caractères génériques ? |
false |
-PrinterObject<CimInstance>
Specifies the object which contains the printer from which to retrieve configuration information.
Alias |
Printer |
Obligatoire ? |
true |
Position ? |
1 |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
True (ByValue, ByPropertyName) |
Accepter les caractères génériques ? |
false |
-ThrottleLimit<Int32>
Spécifie le nombre maximal d’opérations simultanées qui peuvent être établies pour exécuter cette applet de commande. Si ce paramètre est omis ou si la valeur 0
est entrée, Windows PowerShell ® calcule une limitation optimale pour l’applet de commande en fonction du nombre d’applets de commande CIM qui s’exécutent sur l’ordinateur. La limitation s’applique seulement à l’applet de commande actuelle, et non pas à la session ni à l’ordinateur.
Alias |
none |
Obligatoire ? |
false |
Position ? |
named |
Valeur par défaut |
none |
Accepter l’entrée de pipeline ? |
false |
Accepter les caractères génériques ? |
false |
<CommonParameters>
Cette applet de commande prend en charge les paramètres courants : -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer et -OutVariable. Pour plus d’informations, consultez about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entrées
Le type d’entrée correspond au type des objets que vous pouvez transmettre à l’applet de commande.
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_Printer
This cmdlet accepts one printer object.
Sorties
Le type de sortie est le type des objets émis par l’applet de commande.
Microsoft.Management.Infrastructure.CimInstance#MSFT_PrinterConfiguration
This cmdlet returns a printer configuration object.
Exemples
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”}