New-SCServiceTemplate

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

Syntax

New-SCServiceTemplate [-Name] <String> [-Description <String>] [-JobVariable <String>] [-Owner <String>]
 [-PROTipID <Guid>] -Release <String> [-RunAsynchronously] [-ServicePriority <ServicePriority>]
 [-ServiceTemplate <ServiceTemplate>] [-UseAsDefaultRelease <Boolean>] [-UserRole <UserRole>]
 [-VMMServer <ServerConnection>] [<CommonParameters>]

Description

The New-SCServiceTemplate cmdlet creates a service template that is used to create a service in 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.

Examples

Example 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.

Example 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.

Parameters

-Description

Specifies a description for the service template.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a VMM object.

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Owner

Specifies the owner of a VMM object in the form of a valid domain user account.

- Example format: -Owner "Contoso\PattiFuller"

  • Example format: -Owner "PattiFuller@Contoso"

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Release

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, you can customize the string.

Type:String
Required:True
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.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServicePriority

Specifies the priority for a service. Valid values are: Normal, Low, High. Default value: Normal.

Type:ServicePriority
Parameter Sets:Normal, Low, High
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServiceTemplate

Specifies a service template object.

Type:ServiceTemplate
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-UseAsDefaultRelease

Indicates whether this release is used as the default release for the service template.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UserRole

Specifies a user role object.

Type:UserRole
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Outputs

ServiceTemplate

This cmdlet returns a **ServiceTemplate** object.