VApp Category | Vmware PowerCLI Reference

V App Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations

Step 1: Retrieve a object by running a Get command

You can READ objects by using Get-VApp cmdlet. See example below:

# Retrieves all the vApps in the ResourcePool resource pool with no recursion.

Get-ResourcePool MyResourcePool1 | Get-VApp -NoRecursion

Step 2 : Run commands from the CRUD group

You can CREATE objects by using New-VApp cmdlet. See example below:

# Creates a new vApp on the MyVMHost1 host.

New-VApp -Name MyVApp1 -CpuLimitMhz 4000 -CpuReservationMhz 1000 -Location MyVMHost1
You can UPDATE objects by using Export-VApp cmdlet. See example below:

# Retrieves all vApps whose names start with "MyVApp" and exports them to the specified path.

Get-VApp -Name "MyVApp*" | Export-VApp -Destination "C:\vapps\"
You can REMOVE objects by using Remove-VApp cmdlet. See example below:

# Retrieves and removes all vApps available on the MyVMHost1 host.

Get-VMHost -Name MyVMHost1 | Get-VApp | Remove-VApp

Step 3: Explore More Related Commands:

Import-VApp This cmdlet imports OVF (Open Virtualization Format) and OVA packages. The package can contain a virtual appliance or a virtual machine.
Move-VApp This cmdlet moves the specified virtual appliances to a new location.
Set-VApp This cmdlet modifies the specified vApp.
Start-VApp This cmdlet starts vApps.
Stop-VApp This cmdlet stops vApps.