New-CIVAppTemplate Command | Vmware PowerCLI Reference

New-CIVAppTemplate

This cmdlet creates a new vApp template from the specified vApp.

Syntax

New-CIVAppTemplate
[ -VApp ] < CIVApp >
-Name < String >
[ [-OrgVdc ] < OrgVdc > ]
[-Catalog < Catalog > ]
[-CustomizeOnInstantiate ]
[-Description < String > ]
[-RunAsync ]
[-Server < CIServer[] > ]
[-StorageLease < TimeSpan > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VApp CIVApp 1
  • pipeline
Specifies the vApp from which you want to create the new vApp template.
required
Name String named
Specifies a name for the vApp template you want to create.
optional OrgVdc OrgVdc 2
Specifies the organization virtual datacenter (vDC) where you want to store the new vApp template.
optional Catalog Catalog named
Specifies the catalog to which you want to add the new vApp template.
optional CustomizeOnInstantiate SwitchParameter named
Indicates that every vApp created from the template must be customized upon instantiation.
optional Description String named
Specifies a description for the vApp template you want to create.
optional RunAsync SwitchParameter named
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console.
optional Server CIServer[] named
Specifies the cloud servers on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer.
optional StorageLease TimeSpan named
Specifies the maximum amount of time for the vApp to remain stopped before vCloud Director automatically marks it as expired, or deletes it, depending on the organization policy. If you do not specify this parameter, the default storage lease setting of the organization is applied. To specify that the lease is unlimited, pass $null.

Output

VMware.VimAutomation.Cloud.Types.V1.CIVAppTemplate

Examples

Example 1

Get-CIVApp 'MyVApp' | New-CIVAppTemplate -Name 'MyVAppTemplate' -OrgVdc 'MyOrgVdc' -Catalog 'MyCatalog' -Description "MyTemplateDescription"

Creates a new template from a cloud vApp, specifies name and description for the template, places it in the MyOrgVdc organization vDC, and shares it in the MyCatalog catalog.

Example 2

Get-CIVApp 'MyVApp' | New-CIVAppTemplate -Name 'MyVAppTemplate' -OrgVdc 'MyOrgVdc' -CustomizeOnInstantiate

Creates a new template from a cloud vApp, specifies name and destination organization vDC for the template, and enables customization upon instantiation when creating a vApp from the template.

Example 3

Get-CIVApp 'MyVApp' | New-CIVAppTemplate -Name 'MyVAppTemplate' -OrgVdc 'MyOrgVdc' -StorageLease 3.04:30:30 -RunAsync

Asynchronously creates a template from a cloud vApp, specifies name and destination organization vDC for the template, and sets the storage lease to 3 days, 4 hours, 30 minutes and 30 seconds.

Related Commands

CIVApp

This cmdlet retrieves virtual appliances in the cloud.

This cmdlet imports a virtual machine from the underlying vSphere to the cloud.

This cmdlet creates a new vApp.

This cmdlet removes vApps from the cloud.

This cmdlet restarts the specified vApp.

This cmdlet modifies the configuration of the specified vApps in the cloud.

This cmdlet starts the specified vApp.

This cmdlet stops the specified vApp.

This cmdlet suspends the specified vApp.

CIVAppGuest

This cmdlet restarts the guest operating systems of all virtual machines in the specified vApp.

This cmdlet shuts down the guest operating systems of all virtual machines in the specified vApp.

CIVAppNetwork

This cmdlet retrieves the vApp networks available on a vCloud Director server.

This cmdlet creates a new vApp network.

This cmdlet removes the specified vApp networks if they are not in use.

This cmdlet modifies the configuration of the specified vApp networks.

CIVAppStartRule

This cmdlet retrieves the start rules for virtual machines in a specified vApp.

This cmdlet modifies the start rules for virtual machines in the specified vApp.

CIVAppTemplate

This cmdlet retrieves vApp templates.

This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.

This cmdlet creates a new vApp template.

This cmdlet removes the specified vApp template.

This cmdlet modifies the configuration of the specified vApp template.