New-SCPackageMapping
New-SCPackageMapping
Creates a package mapping object.
構文
Parameter Set: Package
New-SCPackageMapping -TemplatePackage <Package> [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: Path
New-SCPackageMapping -Path <String> [-PreferPackageResources] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
詳細説明
The New-SCPackageMapping cmdlet creates a package mapping object. A package mapping object binds resources to a template. For information about how to update the bindings in a package mapping object, see Set-SCPackageMapping.
パラメーター
-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 |
-PreferPackageResources
Indicates that the resources exported with the package are retained even if similar resources exist at the import destination.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-TemplatePackage<Package>
Specifies an exported template package that contains serialized settings of a service or virtual machine template.
エイリアス |
none |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
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)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- PackageMapping
例
Example 1: Create a package mapping for a template package
The first command gets the template package at the specified path, and then stores the package in the $TemplatePackage variable.
The second command creates a package mapping object for the package stored in $TemplatePackage, and then stores the object in the $Mappings variable.
PS C:\> $TemplatePackage = Get-SCTemplatePackage -Path "C:\TemplateExports\VMTemplate01.xml"
PS C:\> $Mappings = New-SCPackageMapping -TemplatePackage $TemplatePackage