Get-PrintConfiguration
Get-PrintConfiguration
Gets the configuration information of a printer.
Syntax
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>]
Detaillierte Beschreibung
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.
Parameter
-AsJob
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-CimSession<CimSession[]>
Führt das Cmdlet in einer Remotesitzung oder auf einem Remotecomputer aus. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, z. B. die Ausgabe eines Cmdlets New-CimSession oder Get-CimSession. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.
Aliasse |
Session |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-ComputerName<String>
Specifies the name of the computer from which to retrieve the printer configuration information.
Aliasse |
Computer,CN |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue, ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-PrinterName<String>
Specifies the name of the printer from which to retrieve the configuration information.
Aliasse |
PN |
Erforderlich? |
true |
Position? |
1 |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue, ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-PrinterObject<CimInstance>
Specifies the object which contains the printer from which to retrieve configuration information.
Aliasse |
Printer |
Erforderlich? |
true |
Position? |
1 |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
True (ByValue, ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-ThrottleLimit<Int32>
Gibt die maximale Anzahl von gleichzeitigen Vorgängen an, die zum Ausführen dieses Cmdlets eingerichtet werden können. Wenn dieser Parameter ausgelassen oder der Wert 0
eingegeben wird, berechnet Windows PowerShell® einen optimalen Drosselungsgrenzwert für das Cmdlet basierend auf der Anzahl der CIM-Cmdlets, die auf dem Computer ausgeführt werden. Die Drosselungsgrenze gilt nur für das aktuelle Cmdlet und nicht für die Sitzung oder den Computer.
Aliasse |
Keiner |
Erforderlich? |
false |
Position? |
named |
Standardwert |
Keiner |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die über die Pipeline an das Cmdlet übergeben werden können.
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_Printer
This cmdlet accepts one printer object.
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
Microsoft.Management.Infrastructure.CimInstance#MSFT_PrinterConfiguration
This cmdlet returns a printer configuration object.
Beispiele
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”}