Set-PrinterProperty

Set-PrinterProperty

Modifies the printer properties for the specified printer.

Syntax

Parameter Set: PrinterName
Set-PrinterProperty [-PrinterName] <String> [-PropertyName] <String> [-Value] <String> [-AsJob] [-CimSession <CimSession> ] [-ComputerName <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: PrinterObject
Set-PrinterProperty [-PrinterObject] <CimInstance> [-PropertyName] <String> [-Value] <String> [-AsJob] [-CimSession <CimSession> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: PrinterPropertyObject
Set-PrinterProperty [-InputObject] <CimInstance> [-AsJob] [-CimSession <CimSession> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-PrinterProperty cmdlet modifies the printer properties for the specified printer.

You cannot use wildcard characters with Set-PrinterProperty. You can use Set-PrinterProperty in a remoting session.

You need administrator privileges to use Set-PrinterProperty.

Parameters

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies the computer name for which to modify the printer properties.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<CimInstance>

Specifies the printer property object which contains the printer property to modify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-PrinterName<String>

Specifies the name of the printer for which to modify the properties.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PrinterObject<CimInstance>

Specifies the printer object for which to update the printer properties.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-PropertyName<String>

Specifies the property name to update.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Value<String>

Specifies the new value of the printer property.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

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

    This cmdlet accepts one printer object.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • This cmdlet produces no output.

Examples

Example 1: Set a printer property

This command sets the Config:PropertyName property of the printer named printer2 to True.

PS C:\> Set-PrinterProperty -PrinterName printer2 -PropertyName "Config:PropertyName" -Value True

Get-PrinterProperty