PowerCLI Reference

New-CIVApp

Synopsis

This cmdlet creates a new vApp.

Syntax

New-CIVApp [-Name] <String> [-Description <String>] -OrgVdc <OrgVdc> [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] [-Confirm] [-WhatIf] [<CommonParameters>]

New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VApp <CIVApp> [-Confirm] [-WhatIf] [<CommonParameters>]

New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VAppTemplate <CIVAppTemplate> [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
Get-CIVApp
Import-CIVApp
Remove-CIVApp
Restart-CIVApp
Set-CIVApp
Start-CIVapp
Stop-CIVApp
Suspend-CIVapp

Detailed Description

This cmdlet creates a new vApp. You can clone an existing vApp or create the vApp from a vApp template. By default, the state of the vApp is Powered Off and the vApp is not deployed.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameStringSpecifies a name for the vApp you want to create.trueFalse
ConfirmSwitchParameterIf 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.falseFalse
DescriptionStringSpecifies a description for the vApp you want to create.falseFalse
OrgVdcOrgVdcSpecifies the organization virtual datacenter (vDC) where you want to store the new vApp.trueTrue (ByValue)
RunAsyncSwitchParameterIndicates 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.falseFalse
RuntimeLeaseTimeSpanSpecifies the maximum running time for the vApp before vCloud Director stops it automatically. To specify that the lease is unlimited, pass $null. When creating a vApp from a vApp template, not specifying this parameter automatically applies the default organization settings. When cloning a vApp, not specifying this parameter automatically applies the source vApp settings.falseFalse
ServerCIServer[]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.falseFalse
StorageLeaseTimeSpanSpecifies 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. To specify that the lease is unlimited, pass $null. When creating a vApp from a vApp template, not specifying this parameter automatically applies the default organization settings. When cloning a vApp, not specifying this parameter automatically applies the source vApp settings.falseFalse
VAppCIVAppSpecifies the vApp you want to clone.trueTrue (ByValue)
VAppTemplateCIVAppTemplateSpecifies the vApp template from which you want to create the new vApp.trueTrue (ByValue)
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

The newly created CIVApp object

Notes

Examples

-------------------------- Example 1 --------------------------

$myVApp = Get-CIVApp -Name 'MySourceVApp'
New-CIVApp -Name 'MyClonedVApp' -Description "This is my cloned vApp" -VApp $myVApp

Creates a new vApp by cloning the specified vApp.

-------------------------- Example 2 --------------------------

$myTemplate = Get-CIVAppTemplate -Name 'MySourceTemplate'
$myOrgVdc = Get-OrgVdc -Name 'MyOrgVdc'
New-CIVApp -Name 'MyNewVApp' -Description "This vApp is created from the vApp template named MySourceTemplate." -OrgVdc $myOrgVdc -VAppTemplate $myTemplate

Creates a new vApp from the specified vApp template and stores it in the specified organization vDC.


Copyright © VMware, Inc. All rights reserved.