Set-SCApplicationSetting

Sets the value of an application setting.

Syntax

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

Description

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

Examples

Example 1: Set the value for an application setting

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"

The first command gets the application profile object named SvcWebAppProfile01 and 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 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.

Parameters

-ApplicationSetting

Specifies an application setting object.

Type:ApplicationSetting
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JobGroup

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.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SecureValue

Specifies the value for a secure string.

Type:SecureString
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Value

Specifies a string used to attribute an object or property.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

ApplicationSetting

This cmdlet returns an ApplicationSetting object.