New-SCServiceTemplate
Creates a service template used to create a service in VMM.
Syntax
New-SCServiceTemplate
[-Name] <String>
[-Description <String>]
[-Owner <String>]
-Release <String>
[-UseAsDefaultRelease <Boolean>]
[-VMMServer <ServerConnection>]
[-UserRole <UserRole>]
[-ServicePriority <ServicePriority>]
[-ServiceTemplate <ServiceTemplate>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of a VMM object.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | Named |
Default value: | None |
Required: | True |
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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Accepted values: | Normal, Low, High |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceTemplate
Specifies a service template object.
Type: | ServiceTemplate |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UseAsDefaultRelease
Indicates whether this release is used as the default release for the service template.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserRole
Specifies a user role object.
Type: | UserRole |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMMServer
Specifies a VMM server object.
Type: | ServerConnection |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Outputs
ServiceTemplate
This cmdlet returns a ServiceTemplate object.