Set-SCServiceSetting

Modifies a service setting.

Syntax

Set-SCServiceSetting [-ServiceSetting] <ServiceSetting> [-Description <String>] [-IsEncrypted <Boolean>]
 [-IsRequired <Boolean>] [-JobVariable <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-RunAsynchronously] [-SecureValue <SecureString>] [-VMMServer <ServerConnection>]
 [<CommonParameters>]
Set-SCServiceSetting [-ServiceSetting] <ServiceSetting> [-Description <String>] [-IsEncrypted <Boolean>]
 [-IsRequired <Boolean>] [-JobVariable <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 [-PROTipID <Guid>] [-RunAsynchronously] [-VMMServer <ServerConnection>] [-Value <String>] [<CommonParameters>]

Description

The Set-SCServiceSetting cmdlet modifies a service setting.

Examples

Example 1: Make a service setting mandatory

PS C:\> $Template = Get-SCServiceTemplate -Name "ServiceTemplate01" | where {$_.Release -eq "Beta"}
PS C:\> $ServiceSetting = Get-SCServiceSetting -ServiceTemplate $Template -Name "Setting01"
PS C:\> Set-SCServiceSetting -ServiceSetting $ServiceSetting -IsRequired $True

The first command gets the service template object named ServiceTemplate01 with a release of Beta and stores the object in the $ServiceTemplate variable.

The second command gets the service setting object named Setting01 from ServiceTemplate01 and stores the object in the $ServiceSetting variable.

The last command modifies the service setting so that it is mandatory.

Parameters

-Description

Specifies a description for the service setting.

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

Indicates whether a service setting is encrypted.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsRequired

Indicates whether a service setting is mandatory.

Type:Boolean
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

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

Specifies a user role. To obtain a user role, use the Get-SCUserRole cmdlet. This cmdlet operates on behalf of the user role that this parameter specifies.

Type:UserRole
Required:False
Position:Named
Default value:None
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
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.

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

Specifies the value for a secure string.

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

Specifies a service setting object.

Type:ServiceSetting
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Value

Specifies a string used to attribute an object or property.

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