## PowerCLI Reference

# New-CIVAppTemplate

## Synopsis

This cmdlet creates a new vApp template.

Syntax

New-CIVAppTemplate [-Name] <String> [-VApp] <CIVApp> [[-OrgVdc] <OrgVdc>] [-Catalog <Catalog>] [-Description <String>] [-RunAsync] [-CustomizeOnInstantiate] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppTemplate
Import-CIVAppTemplate
Remove-CIVAppTemplate
Set-CIVAppTemplate

Detailed Description

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

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String | Specifies a name for the vApp template you want to create. | true | false
VApp | CIVApp | Specifies the vApp from which you want to create the new vApp template. | true | true (ByValue)
OrgVdc | OrgVdc | Specifies the organization virtual datacenter (vDC) where you want to store the new vApp template. | false | false
Catalog | Catalog | Specifies the catalog to which you want to add the new vApp template. | false | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false
CustomizeOnInstantiate | SwitchParameter | Indicates that every vApp created from the template must be customized upon instantiation. | false | false
Description | String | Specifies a description for the vApp template you want to create. | false | false
InformationAction | ActionPreference |  | false | false
InformationVariable | String |  | false | false
PipelineVariable | String |  | false | false
RunAsync | SwitchParameter | 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. | false | false
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false
StorageLease | TimeSpan | 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. | false | false
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

The newly created CIVAppTemplate object

Notes

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.

Copyright © VMware, Inc. All rights reserved.