vSphere 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>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VApp <CIVApp> [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VAppTemplate <CIVAppTemplate> [-WhatIf] [-Confirm] [<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)The organization vDC of the vApp
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 vSphere 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 © 1998 - 2014 VMware, Inc. All rights reserved.