Set-SCApplicationSetting

Set-SCApplicationSetting

Sets the value of an application setting.

Syntax

Parameter Set: Value
Set-SCApplicationSetting [-ApplicationSetting] <ApplicationSetting> [-JobGroup <Guid]> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Value <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: SecureValue
Set-SCApplicationSetting [-ApplicationSetting] <ApplicationSetting> [-JobGroup <Guid]> ] [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-SecureValue <SecureString> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The Set-SCApplicationSetting cmdlet sets the value of an application setting.

Parameters

-ApplicationSetting<ApplicationSetting>

Specifies an application setting object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-JobGroup<Guid]>

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SecureValue<SecureString>

Specifies the value for a secure string.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Value<String>

Specifies a string used to attribute an object or property.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

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.

Outputs

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

  • ApplicationSetting

Examples

Example Example 1: Set the value for an application setting.

The first command gets the application profile object named SvcWebAppProfile01, and then stores the object in the $AppProfile variable.

The second command gets the application deployment object named SvcWebDeployment01 for the application profile stored in $AppProfile, and then stores the object in the $AppDeployment variable.

The third command gets the setting object named Order_Service for the application package in the application deployment stored in $AppDeployment, and then stores the setting object in the $AppSetting variable.

The last command sets the value for the application setting stored in $AppSetting. In this case, the value for the Order_Service setting was updated in the SvcWebDeployment01 application deployment.

PS C:\> $AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
PS C:\> $AppDeployment = Get-SCApplicationDeployment -ApplicationProfile $AppProfile -Name "SvcWebDeployment01"
PS C:\> $AppSetting = Get-SCApplicationSetting -ApplicationDeployment $AppDeployment -Name "Order_Service"
PS C:\> Set-SCApplicationSetting -ApplicationSetting $AppSetting -Value "http://@servicesComputerName@/OrderService.xamlx"

Get-SCApplicationSetting

Get-SCApplicationDeployment

Get-SCApplicationProfile