New-SCServiceConfiguration

Creates a service configuration from a service template.

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.

For more information about New-SCServiceConfiguration, type: "Get-Help New-SCServiceConfiguration -online".

Parameters

Cloud

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a private cloud object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

ServiceTemplate

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a service template object.

CostCenter

Required? false
Accept Pipeline Input? false
Position? named
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.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

ServicePriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the priority for a service. Valid values are: Normal, Low, High. Default value: Normal.

Tag

Required? false
Accept Pipeline Input? false
Position? named
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.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

ServiceTemplate

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a service template object.

VMHostGroup

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host group object or an array of host group objects.

CostCenter

Required? false
Accept Pipeline Input? false
Position? named
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.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

ServicePriority

Required? false
Accept Pipeline Input? false
Position? named
Specifies the priority for a service. Valid values are: Normal, Low, High. Default value: Normal.

Tag

Required? false
Accept Pipeline Input? false
Position? named
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.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Create a service configuration for a host group.
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
The first command gets the host group object with the path All Hosts\HostGroup02\Production and stores the object in the $HostGroup variable.

The second command gets the service template object named ServiceTemplate01 and 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 to the user.
2: Create a service configuration for a private cloud.
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
The first command gets the private cloud object named Production and stores the object in the $Cloud variable.

The second command gets the service template object named ServiceTemplate01 and 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 to the user.

See Also