Set-SCServiceSetting
Modifies a service setting.
Syntax
Set-SCServiceSetting
[-Value <String>]
[-VMMServer <ServerConnection>]
[-ServiceSetting] <ServiceSetting>
[-Description <String>]
[-IsRequired <Boolean>]
[-IsEncrypted <Boolean>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Set-SCServiceSetting
[-SecureValue <SecureString>]
[-VMMServer <ServerConnection>]
[-ServiceSetting] <ServiceSetting>
[-Description <String>]
[-IsRequired <Boolean>]
[-IsEncrypted <Boolean>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsEncrypted
Indicates whether a service setting is encrypted.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsRequired
Indicates whether a service setting is mandatory.
Type: | Boolean |
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 |
-OnBehalfOfUser
Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
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 |
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 |
-ServiceSetting
Specifies a service setting object.
Type: | ServiceSetting |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |