< Back

Set-PrintConfiguration

Wed Jan 30, 2019 5:58 pm

NAME Set-PrintConfiguration



SYNOPSIS

Sets the configuration information for the specified printer.





SYNTAX

Set-PrintConfiguration [-PrinterName] <String> [-CimSession <CimSession[]>] [-Collate <Boolean>] [-Color <Boolean>] [-ComputerName <String>]

[-DuplexingMode {OneSided | TwoSidedLongEdge | TwoSidedShortEdge}] [-PaperSize {Custom | Letter | LetterSmall | Tabloid | Ledger | Legal | Statement |

Executive | A3 | A4 | A4Small | A5 | B4 | B5 | Folio | Quarto | Sheet10x14 | Sheet11x17 | Note | Envelope9 | Envelope10 | Envelope11 | Envelope12 |

Envelope14 | CSheet | DSheet | ESheet | EnvelopeDL | EnvelopeC5 | EnvelopeC3 | EnvelopeC4 | EnvelopeC6 | EnvelopeC65 | EnvelopeB4 | EnvelopeB5 |

EnvelopeB6 | EnvelopeItaly | EnvelopeMonarch | EnvelopePersonal | FanfoldUS | FanfoldStandardGerman | FanfoldLegalGerman | ISOB4 | JapanesePostcard |

Sheet9x11 | Sheet10x11 | Sheet15x11 | EnvelopeInvite | Reserved48 | Reserved49 | LetterExtra | LegalExtra | TabloidExtra | A4Extra | LetterTransverse |

A4Transverse | LetterExtraTransverse | APlus | BPlus | LetterPlus | A4Plus | A5Transverse | B5Transverse | A3Extra | A5Extra | B5Extra | A2 |

A3Transverse | A3ExtraTransverse | JapaneseDoublePostcard | A6 | JapaneseEnvelopeKaku2 | JapaneseEnvelopeKaku3 | JapaneseEnvelopeChou3 |

JapaneseEnvelopeChou4 | LetterRotated | A3Rotated | A4Rotated | A5Rotated | B4JISRotated | B5JISRotated | JapanesePostcardRotated |

JapaneseDoublePostcardRotated | A6Rotated | JapaneseEnvelopeKaku2Rotated | JapaneseEnvelopeKaku3Rotated | JapaneseEnvelopeChou3Rotated |

JapaneseEnvelopeChou4Rotated | B6JIS | B6JISRotated | Sheet12x11 | JapaneseEnvelopeYou4 | JapaneseEnvelopeYou4Rotated | PRC16K | PRC32K | PRC32KBig |

PRCEnvelope1 | PRCEnvelope2 | PRCEnvelope3 | PRCEnvelope4 | PRCEnvelope5 | PRCEnvelope6 | PRCEnvelope7 | PRCEnvelope8 | PRCEnvelope9 | PRCEnvelope10 |

PRC16KRotated | PRC32KRotated | PRC32KBigRotated | PRCEnvelope1Rotated | PRCEnvelope2Rotated | PRCEnvelope3Rotated | PRCEnvelope4Rotated |

PRCEnvelope5Rotated | PRCEnvelope6Rotated | PRCEnvelope7Rotated | PRCEnvelope8Rotated | PRCEnvelope9Rotated | PRCEnvelope10Rotated}] [-PrintTicketXml

<String>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-PrintConfiguration [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]



Set-PrintConfiguration [-PrinterObject] <CimInstance> [-CimSession <CimSession[]>] [-Collate <Boolean>] [-Color <Boolean>] [-DuplexingMode {OneSided |

TwoSidedLongEdge | TwoSidedShortEdge}] [-PaperSize {Custom | Letter | LetterSmall | Tabloid | Ledger | Legal | Statement | Executive | A3 | A4 | A4Small

| A5 | B4 | B5 | Folio | Quarto | Sheet10x14 | Sheet11x17 | Note | Envelope9 | Envelope10 | Envelope11 | Envelope12 | Envelope14 | CSheet | DSheet |

ESheet | EnvelopeDL | EnvelopeC5 | EnvelopeC3 | EnvelopeC4 | EnvelopeC6 | EnvelopeC65 | EnvelopeB4 | EnvelopeB5 | EnvelopeB6 | EnvelopeItaly |

EnvelopeMonarch | EnvelopePersonal | FanfoldUS | FanfoldStandardGerman | FanfoldLegalGerman | ISOB4 | JapanesePostcard | Sheet9x11 | Sheet10x11 |

Sheet15x11 | EnvelopeInvite | Reserved48 | Reserved49 | LetterExtra | LegalExtra | TabloidExtra | A4Extra | LetterTransverse | A4Transverse |

LetterExtraTransverse | APlus | BPlus | LetterPlus | A4Plus | A5Transverse | B5Transverse | A3Extra | A5Extra | B5Extra | A2 | A3Transverse |

A3ExtraTransverse | JapaneseDoublePostcard | A6 | JapaneseEnvelopeKaku2 | JapaneseEnvelopeKaku3 | JapaneseEnvelopeChou3 | JapaneseEnvelopeChou4 |

LetterRotated | A3Rotated | A4Rotated | A5Rotated | B4JISRotated | B5JISRotated | JapanesePostcardRotated | JapaneseDoublePostcardRotated | A6Rotated |

JapaneseEnvelopeKaku2Rotated | JapaneseEnvelopeKaku3Rotated | JapaneseEnvelopeChou3Rotated | JapaneseEnvelopeChou4Rotated | B6JIS | B6JISRotated |

Sheet12x11 | JapaneseEnvelopeYou4 | JapaneseEnvelopeYou4Rotated | PRC16K | PRC32K | PRC32KBig | PRCEnvelope1 | PRCEnvelope2 | PRCEnvelope3 |

PRCEnvelope4 | PRCEnvelope5 | PRCEnvelope6 | PRCEnvelope7 | PRCEnvelope8 | PRCEnvelope9 | PRCEnvelope10 | PRC16KRotated | PRC32KRotated |

PRC32KBigRotated | PRCEnvelope1Rotated | PRCEnvelope2Rotated | PRCEnvelope3Rotated | PRCEnvelope4Rotated | PRCEnvelope5Rotated | PRCEnvelope6Rotated |

PRCEnvelope7Rotated | PRCEnvelope8Rotated | PRCEnvelope9Rotated | PRCEnvelope10Rotated}] [-PrintTicketXml <String>] [-ThrottleLimit <Int32>] [-Confirm]

[-WhatIf] [<CommonParameters>]





DESCRIPTION

The Set-PrintConfiguration cmdlet sets the printer configuration for the specified printer. Using the Set-PrintConfiguration cmdlet, you can manage the

configuration of the following features:



-- Collate

-- Color

-- Duplexing Mode

-- N-Up

-- Paper Size



The Set-PrintConfiguration cmdlet also accepts print configuration objects by using the Get-PrintConfiguration cmdlet.





You cannot use wildcard characters with Set-PrintConfiguration. You can use Set-PrintConfiguration in a Windows PowerShell remoting session.

You need administrator credentials to use Set-PrintConfiguration.







PARAMETERS

-CimSession [<CimSession[]>]

Runs 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.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Collate [<Boolean>]

Specifies whether to collate the output of the printer by default.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Color [<Boolean>]

Specifies whether the printer should use either color or grayscale printing by default.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-ComputerName [<String>]

Specifies the name of the computer on which the printer is located.



Required? false

Position? named

Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-DuplexingMode [<DuplexingModeEnum>]

Specifies the duplexing mode the printer uses by default. The acceptable values for this parameter are:



-- OneSided

-- TwoSidedLongEdge

-- TwoSidedShortEdge



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-PaperSize [<PaperSizeEnum>]

Specifies the paper size the printer uses by default. For valid values, see the Syntax section.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-PrintTicketXml [<String>]

Specifies the print ticket XML defining the default print settings for this printer.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-PrinterName <String>

Specifies the printer on which to set the configuration information.



Required? true

Position? 1

Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-PrinterObject <CimInstance>

Specifies the object which contains the printer on which to change the configuration settings.



Required? true

Position? 1

Default value none

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-ThrottleLimit [<Int32>]

Specifies 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 Windows 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.



Required? false

Position? named

Default value none

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value false

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_Printer



This cmdlet accepts one printer object.





OUTPUTS





This cmdlet produces no output objects.





Example 1: Set the default paper size



PS C:\\> Set-PrintConfiguration ????????PrinterName "Microsoft XPS Document Writer" -PaperSize A4



This command sets the default paper size of the printer named Microsoft XPS Document Writer printer to A4.





Example 2: Set the default paper size using print configuration object



PS C:\\>$PrintConfiguration = Get-PrintConfiguration ????????PrinterName "Microsoft XPS Document Writer"

PS C:\\> $PrintConfiguration.paperSize = A4

PS C:\\> Set-PrintConfiguration ????????InputObject $PrintConfiguration



The first command gets a printer configuration by using Get-PrintConfiguration. The command stores the result in the $PrintConfiguration variable.



The second command assigns the value A4 to the paperSize property of $PrintConfiguration.



The final command sets the value of the printer configuration to the modified value of $PrintConfiguration.





Example 3: Set the default paper size of all printers



PS C:\\>$Printers = Get-Printer * Foreach ($Printer in $Printers){ ?? ?? ?? ?? Set-PrintConfiguration ????????PrinterName $Printer.name -PaperSize A4}



This command gets all the printers into a variable $Printers and then loops through all the printers and displays the properties.







RELATED LINKS

Get-PrintConfiguration