## 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>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VApp <CIVApp> [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CIVApp [-Name] <String> [-Description <String>] [-OrgVdc <OrgVdc>] [-RunAsync] [-RuntimeLease <TimeSpan>] [-Server <CIServer[]>] [-StorageLease <TimeSpan>] -VAppTemplate <CIVAppTemplate> [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String | Specifies a name for the vApp you want to create. | true | 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
Description | String | Specifies a description for the vApp you want to create. | false | false
InformationAction | ActionPreference |  | false | false
InformationVariable | String |  | false | false
OrgVdc | OrgVdc | Specifies the organization virtual datacenter (vDC) where you want to store the new vApp. | true | true (ByValue)
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
RuntimeLease | TimeSpan | Specifies 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. | 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. 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. | false | false
VApp | CIVApp | Specifies the vApp you want to clone. | true | true (ByValue)
VAppTemplate | CIVAppTemplate | Specifies the vApp template from which you want to create the new vApp. | true | true (ByValue)
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 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.