New-CIVApp Command | Vmware PowerCLI Reference

New-CIVApp

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.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
Name String named
Specifies a name for the vApp you want to create.
required
VApp CIVApp named
  • pipeline
Specifies the vApp you want to clone.
optional Description String named
Specifies a description for the vApp you want to create.
optional OrgVdc OrgVdc named
  • pipeline
Specifies the organization virtual datacenter (vDC) where you want to store the new vApp.
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 RuntimeLease TimeSpan named
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.
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. 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.
New-CIVApp
-Name < String >
-OrgVdc < OrgVdc >
[-Description < String > ]
[-RunAsync ]
[-RuntimeLease < TimeSpan > ]
[-Server < CIServer[] > ]
[-StorageLease < TimeSpan > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Name String named
Specifies a name for the vApp you want to create.
required
OrgVdc OrgVdc named
  • pipeline
Specifies the organization virtual datacenter (vDC) where you want to store the new vApp.
optional Description String named
Specifies a description for the vApp 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 RuntimeLease TimeSpan named
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.
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. 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.
New-CIVApp
-Name < String >
-VAppTemplate < CIVAppTemplate >
[-Description < String > ]
[-OrgVdc < OrgVdc > ]
[-RunAsync ]
[-RuntimeLease < TimeSpan > ]
[-Server < CIServer[] > ]
[-StorageLease < TimeSpan > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Name String named
Specifies a name for the vApp you want to create.
required
VAppTemplate CIVAppTemplate named
  • pipeline
Specifies the vApp template from which you want to create the new vApp.
optional Description String named
Specifies a description for the vApp you want to create.
optional OrgVdc OrgVdc named
  • pipeline
Specifies the organization virtual datacenter (vDC) where you want to store the new vApp.
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 RuntimeLease TimeSpan named
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.
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. 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.

Output

VMware.VimAutomation.Cloud.Types.V1.CIVApp

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.

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.