Export-SCTemplate
Export-SCTemplate
Exports a template from the VMM library to the specified path.
構文
Parameter Set: ServiceTemplate
Export-SCTemplate [-ServiceTemplate] <ServiceTemplate> -Path <String> [-AllowUnencryptedTransfer] [-IncludeAllLibraryResources] [-IncludeLibraryResources <ItemBase[]> ] [-Overwrite] [-Password <String> ] [-SettingsIncludePrivate] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: VMTemplate
Export-SCTemplate [-VMTemplate] <Template> -Path <String> [-AllowUnencryptedTransfer] [-IncludeAllLibraryResources] [-IncludeLibraryResources <ItemBase[]> ] [-Overwrite] [-Password <String> ] [-SettingsIncludePrivate] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
詳細説明
The Export-SCTemplate cmdlet exports a template from the Virtual Machine Manager (VMM) library to the specified path. You can also export the library objects on which the template is dependent.
パラメーター
-AllowUnencryptedTransfer
Indicates that network file transfers do not require encryption. Allowing unencrypted network file transfers can improve performance if neither the source host nor the destination host requires encryption.
Use this parameter to:
-- Allow unencrypted file transfers into, or out of, the library.
-- Allow unencrypted file transfers into, out of, or within a host group.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IncludeAllLibraryResources
Indicates that all of the dependencies for a template are exported from the VMM library with the template.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-IncludeLibraryResources<ItemBase[]>
Specifies dependent library resources that are to be exported with a template.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Overwrite
Indicates that an import or export operation will overwrite an existing file with the same name. Or, that an import operation will overwrite an existing virtual machine template or service template object with the same name.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Password<String>
Specifies a secure string that contains a password.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Path<String>
Specifies the destination path for the operation.
Example formats:
Local: -Path "F:\"
UNC: -Path "\\Library\Templates"
Volume GUID: -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"
VMware ESX: -Path "[storage1]\MyVMwareFolderForVMs\MyVM.vmx"
Citrix XenServer: -Path "Local storage[99b6212f-b63d-c676-25f9-d6c460992de7]"
Wildcards are supported for Get- cmdlets and when you specify the UNC path.
Example format:
UNC: -Path "\\VMHostServer\MyVMs\*VM*"
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ServiceTemplate<ServiceTemplate>
Specifies a service template object.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-SettingsIncludePrivate
Indicates that sensitive template settings are included in an import or export operation.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMTemplate<Template>
Specifies a VMM template object used to create virtual machines.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- SCTemplate
例
Example 1: Export a service template with all of its settings
The first command gets the service template object named ServiceTemplate01, and then stores the object in the $ServiceTemplate variable.
The second command exports the service template stored in $ServiceTemplate, including all settings, and overwrites existing template export packages that have the same name.
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> Export-SCTemplate -ServiceTemplate $ServiceTemplate -Path "C:\TemplateExports" -SettingsIncludePrivate -Overwrite
Example 2: Export multiple service templates with all of their settings
This command uses the Get-SCServiceTemplate cmdlet to get all service template objects. Then, it uses the pipeline operator to send the objects to the to the Export-SCTemplate cmdlet. That cmdlet exports the templates, overwriting any existing files.
PS C:\> Get-SCServiceTemplate | Export-SCTemplate -Path "C:\TemplateExports" -SettingsIncludePrivate -Overwrite
Example Example 3.: Export a service template including its dependent library resources.:
The first command gets the service template object named ServiceTemplate01, and then stores the object in the $ServiceTemplate variable.
The second command exports ServiceTemplate01 and all of its dependent resources from the VMM library to C:\TempalteExports.
PS C:\> $ServiceTemplate = Get-SCServiceTemplate -Name "ServiceTemplate01"
PS C:\> Export-SCTemplate -ServiceTemplate $ServiceTemplate -Path "C:\TemplateExports" -IncludeAllLibraryResources