Set-SCACAdminSetting

Applies To: System Center 2012 R2 App Controller

Set-SCACAdminSetting

Sets an administrator setting to a specified value.

Syntax

Parameter Set: AdminSettingBySettingObject
Set-SCACAdminSetting [-AdminSetting] <ACAdminSetting> [-Value] <Int32> [-PassThru] [ <CommonParameters>]

Parameter Set: CEIP
Set-SCACAdminSetting -CEIPEnabled <Int32> [-PassThru] [ <CommonParameters>]

Parameter Set: JobHistoryPeriod
Set-SCACAdminSetting -JobHistoryPeriodInDays <Int32> [-PassThru] [ <CommonParameters>]

Parameter Set: RefreshInterval
Set-SCACAdminSetting -RefreshIntervalInSeconds <Int32> [-PassThru] [ <CommonParameters>]

Detailed Description

The Set-SCACAdminSetting cmdlet sets an administrator setting to a specified value.

Parameters

-AdminSetting<ACAdminSetting>

Specifies an administator setting object. To get an administrator setting object, use the Get-SCAdminSetting cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-CEIPEnabled<Int32>

Specifies whether participation in the Microsoft Customer Experience Improvement Program (CEIP) is enabled. Valid values are:

-- 0 = Not enabled

-- 1 = Enabled

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobHistoryPeriodInDays<Int32>

Specifies the number of days for the job history period.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Returns an administrator setting object. By default, this cmdlet does not generate output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RefreshIntervalInSeconds<Int32>

Specifies the number of seconds for the refresh interval.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Value<Int32>

Specifies the value for an administrator setting. Valid values are integers.

Aliases

none

Required?

true

Position?

2

Default Value

none

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.

Inputs

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

  • Microsoft.SystemCenter.CloudManager.PowerShell.ACAdminSetting, System.String, System.Int32

Outputs

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

  • Microsoft.SystemCenter.CloudManager.PowerShell.ACAdminSetting

Examples

Example 1: Set the JobHistoryPeriodInDays administrator setting

This command sets the JobHistoryPeriodInDays administrator setting to 60.

PS C:\> Set-SCACAdminSetting -JobHistoryPeriodInDays 60

Example 2: Enable the CEIPEnabled administrator setting

This command enables the CEIP setting by setting the CEIPEnabled administrator setting to 1.

PS C:\> Set-SCACAdminSetting –CEIPEnabled “1”

Example 3: Update the value for the RefreshIntervalInSeconds administrator setting

The first command gets the administrator setting object named RefreshIntervalInSeconds and stores the object in the $Setting variable.

The second command sets the value for the administrator setting stored in $Setting (RefreshIntervalInSeconds) to 30.

PS C:\> $Setting = Get-SCACAdminSetting -RefreshIntervalInSeconds
PS C:\> Set-SCACAdminSetting -AdminSetting $Setting -Value 30

Get-SCACAdminSetting