Get-SCServiceSetting

Gets a service setting for a service template or a service instance.

Syntax

Get-SCServiceSetting [-Name <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 -Service <Service> [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCServiceSetting [-Name <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 -ServiceConfiguration <ServiceConfiguration> [-VMMServer <ServerConnection>] [<CommonParameters>]
Get-SCServiceSetting [-Name <String>] [-OnBehalfOfUser <String>] [-OnBehalfOfUserRole <UserRole>]
 -ServiceTemplate <ServiceTemplate> [-VMMServer <ServerConnection>] [<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
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
-Service

Specifies a VMM service object.

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

Specifies a service configuration object.

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

Specifies a service template object.

Type:ServiceTemplate
Required:True
Position:Named
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