New-SCServiceConfiguration

New-SCServiceConfiguration

Creates a service configuration from a service template.

Syntax

Parameter Set: Cloud
New-SCServiceConfiguration [-Name] <String> -Cloud <Cloud> -ServiceTemplate <ServiceTemplate> [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <String> ] [-Tag <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: HostGroup
New-SCServiceConfiguration [-Name] <String> -ServiceTemplate <ServiceTemplate> -VMHostGroup <HostGroup> [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <String> ] [-Tag <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The New-SCServiceConfiguration cmdlet creates a service configuration from a service template. The service configuration contains instance-specific values that are used when the service is deployed.

Parameters

-Cloud<Cloud>

Specifies a private cloud object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CostCenter<String>

Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines, or resources allocated to virtual machines, to make use of in your billing system.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUser<System.String>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServicePriority<String>

Specifies the priority for a service. Valid values are:

-- Normal
-- Low
-- High

The default value is Normal.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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

-Tag<String>

Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMHostGroup<HostGroup>

Specifies a virtual machine host group object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

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.

  • ServiceConfiguration

Examples

Example Example 1: Create a service configuration for a host group.

The first command gets the host group object with the path All Hosts\HostGroup02\Production, and then stores the object in the $HostGroup variable.

The second command gets the service template object named ServiceTemplate01, and then stores it in the $ServiceTemplate variable.

The third command creates a service configuration object in the library for the host group stored in $HostGroup using the service template object stored in $ServiceTemplate. The command then stores the new service configuration object in the $ServiceConfig variable.

The last command displays the properties of the new service configuration object.

PS C:\> $HostGroup = Get-SCVMHostGroup | where { $_.Path -eq "All Hosts\HostGroup02\Production" }
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $ServiceConfig = New-SCServiceConfiguration -ServiceTemplate $ServiceTemplate -Name "Service01" -VMHostGroup $HostGroup -Description "Contoso Service 01" -ServicePriority "High" -CostCenter "1033"
PS C:\> $ServiceConfig

Example Example 2: Create a service configuration for a private cloud.

The first command gets the private cloud object named Production, and then stores the object in the $Cloud variable.

The second command gets the service template object named ServiceTemplate01, and then stores it in the $ServiceTemplate variable.

The third command creates a service configuration object in the library for the private cloud stored in $Cloud using the service template object stored in $ServiceTemplate. The command then stores the new service configuration object in the $ServiceConfig variable.

The last command displays the properties of the new service configuration object.

PS C:\> $Cloud = Get-SCCloud -Name "Production"
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> $ServiceConfig = New-SCServiceConfiguration -ServiceTemplate $ServiceTemplate -Name "Service02" -Cloud $Cloud -Description "Contoso Cloud Service" -ServicePriority "High" -CostCenter "1033"
PS C:\> $ServiceConfig

Get-SCServiceConfiguration

Get-SCServiceTemplate

Remove-SCServiceConfiguration

Set-SCServiceConfiguration

Update-SCServiceConfiguration

Get-SCVMHostGroup

Get-SCCloud