New-SCServiceConfiguration
New-SCServiceConfiguration
Creates a service configuration from a service template.
構文
Parameter Set: Cloud
New-SCServiceConfiguration [-Name] <String> -Cloud <Cloud> -ServiceTemplate <ServiceTemplate> [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <String> ] [-Tag <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: HostGroup
New-SCServiceConfiguration [-Name] <String> -ServiceTemplate <ServiceTemplate> -VMHostGroup <HostGroup> [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-ServicePriority <String> ] [-Tag <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
詳細説明
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.
パラメーター
-Cloud<Cloud>
Specifies a private cloud object.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CostCenter<String>
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.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-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 |
-OnBehalfOfUser<System.String>
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>
エイリアス |
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 |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ServicePriority<String>
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 |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-Tag<String>
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.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMHostGroup<HostGroup>
Specifies a virtual machine host group object.
エイリアス |
none |
必須? |
true |
位置は? |
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)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- ServiceConfiguration
例
Example Example 1: Create a service configuration for a host group.
The first command gets the host group object with the path All Hosts\HostGroup02\Production, and then stores the object in the $HostGroup variable.
The second command gets the service template object named ServiceTemplate01, and then 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.
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
Example Example 2: Create a service configuration for a private cloud.
The first command gets the private cloud object named Production, and then stores the object in the $Cloud variable.
The second command gets the service template object named ServiceTemplate01, and then 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.
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