New-SCServiceTemplate

New-SCServiceTemplate

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

構文

Parameter Set: Default
New-SCServiceTemplate [-Name] <String> -Release <String> [-Description <String> ] [-JobVariable <String> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <ServicePriority> {Normal | Low | High} ] [-ServiceTemplate <ServiceTemplate> ] [-UseAsDefaultRelease <Boolean> ] [-UserRole <UserRole> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

詳細説明

The New-SCServiceTemplate cmdlet creates a service template that you use 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 that describe how the service should be deployed, configured, and serviced. Service templates are stored in the VMM library.

パラメーター

-Description<String>

States a description for the specified object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobVariable<String>

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Name<String>

Specifies the name of a VMM object.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Owner<String>

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"

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PROTipID<Guid]>

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Release<String>

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.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RunAsynchronously

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

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ServicePriority<ServicePriority>

Specifies the priority for a service. Valid values are:

-- Normal
-- Low
-- High

The default value is Normal.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ServiceTemplate<ServiceTemplate>

Specifies a service template object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-UseAsDefaultRelease<Boolean>

Specifies that this release is used as the default release for the service template.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UserRole<UserRole>

Specifies a user role object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • ServiceTemplate

Example 1: Create a service template

The first command creates a service template object named ServiceTemplate01, and then stores the object in the $SvcTemplate variable.

The second command displays information about the service template object.

PS C:\> $SvcTemplate = New-SCServiceTemplate -Name "ServiceTemplate01" -Release "Beta" -Description "Service Template 01" -Owner "Contoso\Katarina"
PS C:\> $SvcTemplate

Example 2: Clone a service template

The first command gets the service template object named ServiceTemplate01 with a release of Beta, and then 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.

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

関連トピック

Get-SCServiceTemplate

Read-SCServiceTemplate

Remove-SCServiceTemplate

Resolve-SCServiceTemplate

Set-SCServiceTemplate

Test-SCServiceTemplate