New-SCServiceTemplate

Creates a service template used to create a service in VMM.

Description

The New-SCServiceTemplate cmdlet creates a service template used to create a service in System Center Virtual Machine Manager (VMM). A service template is a description of a service that contains a set of service templates which describe how the service should be deployed, configured, and serviced. Service templates are stored in the VMM library. 

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

Parameters

Name

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

Release

Required? true
Accept Pipeline Input? false
Position? named
Specifies a string that describes the release of a library resource. VMM automatically creates a release value for every resource imported into the library. After the resource has been imported, the string can be customized.

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. 

Owner

Required? false
Accept Pipeline Input? false
Position? named
Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"

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.

ServiceTemplate

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

UseAsDefaultRelease

Required? false
Accept Pipeline Input? false
Position? named
Specifies that this release is used as the default release for the service template.

UserRole

Required? false
Accept Pipeline Input? false
Position? named
Specifies a user role object.

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Examples

1: Create a service template.
PS C:\> $SvcTemplate = New-SCServiceTemplate -Name "ServiceTemplate01" -Release "Beta" -Description "Service Template 01" -Owner "Contoso\Katarina" 
PS C:\> $SvcTemplate
The first command creates a service template object named ServiceTemplate01 and stores the object in the $SvcTemplate variable.

The second command displays information about the service template object to the user.
2: Clone a service template.
PS C:\> $SvcTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01" | where { $_.Release -eq "Beta" }
PS C:\> $NewSvcTemplate = New-SCServiceTemplate -Name "ServiceTemplate01" -Release "v1" -ServiceTemplate $SvcTemplate
PS C:\> $NewSvcTemplate
The first command gets the service template object named ServiceTemplate01 with a release of Beta and stores the object in the $SvcTemplate variable.

The second command creates a clone of ServiceTemplate01 and gives it a release value of v1. The command then stores the service template object in the $NewSvcTemplate variable.

The last command displays information about the cloned service template object to the user.

See Also