PowerShell Logo Small

Set-Printer



This is the built-in help made by Microsoft for the command 'Set-Printer', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Updates the configuration of an existing printer.

SYNTAX


Set-Printer [-Name] <String[]> [-AsJob] [-BranchOfficeOfflineLogSizeMB <UInt32>] [-CimSession <CimSession[]>] [-Comment <String>] [-ComputerName <String>] [-Datatype
<String>] [-DisableBranchOfficeLogging <Boolean>] [-DriverName <String>] [-KeepPrintedJobs <Boolean>] [-Location <String>] [-PassThru] [-PermissionSDDL <String>] [-PortName
<String>] [-PrintProcessor <String>] [-Priority <UInt32>] [-Published <Boolean>] [-RenderingMode <RenderingModeEnum>] [-SeparatorPageFile <String>] [-Shared <Boolean>]
[-ShareName <String>] [-StartTime <UInt32>] [-ThrottleLimit <Int32>] [-UntilTime <UInt32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-Printer [-AsJob] [-BranchOfficeOfflineLogSizeMB <UInt32>] [-CimSession <CimSession[]>] [-Comment <String>] [-Datatype <String>] [-DisableBranchOfficeLogging <Boolean>]
[-DriverName <String>] [-KeepPrintedJobs <Boolean>] [-Location <String>] [-PassThru] [-PermissionSDDL <String>] [-PortName <String>] [-PrintProcessor <String>] [-Priority
<UInt32>] [-Published <Boolean>] [-RenderingMode <RenderingModeEnum>] [-SeparatorPageFile <String>] [-Shared <Boolean>] [-ShareName <String>] [-StartTime <UInt32>]
[-ThrottleLimit <Int32>] [-UntilTime <UInt32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-Printer cmdlet updates the configuration of the specified printer.


Use the KeepPrintedJobs parameter to make a printer keep printed jobs.


You can specify the printer to update by using either a printer object retrieved by Get-Printer, or by specifying a printer name.


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


You need administrator privileges to use Set-Printer.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=289479
Add-Printer
Get-Printer
Remove-Printer
Rename-Printer

REMARKS

<

Examples


Example 1: Set printer to keep printed jobs

PS C:\> Set-Printer –Name "Microsoft XPS Document Writer" -KeepPrintedJobs $true



This command configures the "Microsoft XPS Document Writer" printer to keep printed jobs.




Example 2: Set printer to keep printed jobs by using a printer object

PS C:\>$printer = Get-Printer –Name "Microsoft XPS Document Writer"


PS C:\>$printer.KeepPrintedJobs = $true


PS C:\>Set-Printer –InputObject $printer



This set of commands retrieves a printer object in to a variable ($printer) using Get-Printer, and passes the contents of the variable to Set-Printer.