Share via


Get-SCTemplatePackage

Gets an exported service template or virtual machine template package at a specified location.

Syntax

Default (Default)

Get-SCTemplatePackage
    -Path <String>
    [<CommonParameters>]

Description

The Get-SCTemplatePackage cmdlet gets an exported service template or virtual machine template package at a specified location. After you get the template package object, you can read the properties of the object, or you can input the object into the Import-SCTemplate cmdlet.

For more information about importing a template package, type Get-Help Import-SCTemplate -Detailed.

Examples

Example 1: Get a template package from a specified location

PS C:\> $TemplatePackage = Get-SCTemplatePackage -Path "C:\TemplateExports"

This command gets the template package object in C:\TemplateExports and stores the object in the $TemplatePackage variable.

Parameters

-Path

Specifies the destination path for the operation.

Example formats:

  • Local path: -Path "F:\"
  • UNC path: -Path "\\Library\Templates"
  • Volume GUID path: -Path "\\?\Volume{4703c1ea-8ae7-11db-b473-00123f7603e3}\"
  • VMware ESX path: -Path "\[storage1\]\MyVMwareFolderForVMs\MyVM.vmx"
  • Citrix XenServer path: -Path "Local storage\[99b6212f-b63d-c676-25f9-d6c460992de7\]"

This parameter accepts wildcard characters for a UNC path.

Example format:

UNC path: -Path "\\VMHostServer\MyVMs\*VM*"

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

TemplatePackage

This cmdlet returns an array of TemplatePackage objects.