Share via


Get-SCServiceSetting

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

Syntax

ServiceTemplate

Get-SCServiceSetting
    -ServiceTemplate <ServiceTemplate>
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

ServiceConfiguration

Get-SCServiceSetting
    -ServiceConfiguration <ServiceConfiguration>
    [-VMMServer <ServerConnection>]
    [-Name <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

Service

Get-SCServiceSetting
    -Service <Service>
    [-VMMServer <ServerConnection>]
    [-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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OnBehalfOfUser

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:UserRole
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Service

Specifies a VMM service object.

Parameter properties

Type:Service
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Service
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceConfiguration

Specifies a service configuration object.

Parameter properties

Type:ServiceConfiguration
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ServiceConfiguration
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceTemplate

Specifies a service template object.

Parameter properties

Type:ServiceTemplate
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ServiceTemplate
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.