Get-SCServiceSetting

Get-SCServiceSetting

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

Syntax

Parameter Set: Service
Get-SCServiceSetting -Service <Service> [-Name <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: ServiceConfiguration
Get-SCServiceSetting -ServiceConfiguration <ServiceConfiguration> [-Name <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: ServiceTemplate
Get-SCServiceSetting -ServiceTemplate <ServiceTemplate> [-Name <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

Get-SCServiceSetting cmdlet gets one or more service settings for a service template or a service instance.

Parameters

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Service<Service>

Specifies a VMM service object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ServiceConfiguration<ServiceConfiguration>

Specifies a service configuration object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-ServiceTemplate<ServiceTemplate>

Specifies a service template object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

1. Retrieve all service settings from a service 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 to the user.

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

2. Retrieve a service setting from a service configuration.

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.

PS C:\> $Config = Get-SCServiceConfiguration -Name "ServiceConfig01"
PS C:\> $Setting = Get-SCServiceSetting -ServiceConfiguration $Config -Name "Setting01"
PS C:\> $Setting

Set-SCServiceSetting