Get-SCServiceSetting
Gets a service setting for a service template or a service instance.
Syntax
Get-SCServiceSetting
[-VMMServer <ServerConnection>]
-ServiceTemplate <ServiceTemplate>
[-Name <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCServiceSetting
[-VMMServer <ServerConnection>]
-ServiceConfiguration <ServiceConfiguration>
[-Name <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Get-SCServiceSetting
[-VMMServer <ServerConnection>]
-Service <Service>
[-Name <String>]
[-OnBehalfOfUser <String>]
[-OnBehalfOfUserRole <UserRole>]
[<CommonParameters>]
Description
The Get-SCServiceSetting cmdlet gets one or more service settings for a service template or a service instance.
Examples
Example 1: Retrieve all service settings from a service template
PS C:\> $Template = Get-SCServiceTemplate -Name "ServiceTemplate01" | where {$_.Release -eq "Beta"}
PS C:\> Get-SCServiceSetting -ServiceTemplate $Template
The first command gets the service template object named ServiceTemplate01 with the release of Beta and stores the object in the $Template variable.
The second command gets all service settings for ServiceTemplate01 and displays their properties.
Example 2: Retrieve a service setting from a service configuration
PS C:\> $Config = Get-SCServiceConfiguration -Name "ServiceConfig01"
PS C:\> $Setting = Get-SCServiceSetting -ServiceConfiguration $Config -Name "Setting01"
PS C:\> $Setting
The first command gets the service configuration object named ServiceConfig01 and stores the object in the $Config variable.
The second command gets the service setting object named Setting01 associated with ServiceConfig01 and stores the object in the $ServiceSetting variable.
The last command displays the properties for the service setting stored in $ServiceSetting.
Parameters
-Name
Specifies the name of a Virtual Machine Manager (VMM) object.
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 |
-Service
Specifies a VMM service object.
Type: | Service |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServiceConfiguration
Specifies a service configuration object.
Type: | ServiceConfiguration |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServiceTemplate
Specifies a service template object.
Type: | ServiceTemplate |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |