Set-VApp Command | Vmware PowerCLI Reference

Set-VApp

This cmdlet modifies the specified vApp.

Syntax

Set-VApp
-VApp < VApp[] >
[-CpuExpandableReservation < Boolean > ]
[-CpuLimitMhz < Int64 > ]
[-CpuReservationMhz < Int64 > ]
[-CpuSharesLevel < SharesLevel > ]
[-MemExpandableReservation < Boolean > ]
[-MemLimitGB < Decimal > ]
[-MemLimitMB < Int64 > ]
[-MemReservationGB < Decimal > ]
[-MemReservationMB < Int64 > ]
[-MemSharesLevel < SharesLevel > ]
[-Name < String > ]
[-NumCpuShares < Int32 > ]
[-NumMemShares < Int32 > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VApp VApp[] named
  • pipeline
  • wildcards
Specifies the vApp that you want to configure.
optional CpuExpandableReservation Boolean named
Indicates that the CPU reservation can grow beyond the specified value if there are available resources.
optional CpuLimitMhz Int64 named
Specifies a CPU usage limit in MHz. If this parameter is set, utilization will not exceed this limit even if there are available resources.
optional CpuReservationMhz Int64 named
Specifies the guaranteed available CPU in MHz.
optional CpuSharesLevel SharesLevel named
Specifies the CPU allocation level for this vApp. This property is used in relative allocation between resource consumers. This parameter accepts Custom, High, Low, and Normal values.
optional MemExpandableReservation Boolean named
Indicates that the memory reservation can grow beyond the specified value if there are available resources.
optional MemLimitGB Decimal named
Specifies a memory usage limit in gigabytes (GB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources.
optional MemLimitMB Int64 named
This parameter is obsolete. Use MemLimitGB instead. Specifies a memory usage limit in megabytes (MB). If this parameter is set, utilization will not exceed the specified limit even if there are available resources.
optional MemReservationGB Decimal named
Specifies the guaranteed available memory in gigabytes (GB).
optional MemReservationMB Int64 named
This parameter is obsolete. Use MemReservationGB instead. Specifies the guaranteed available memory in megabytes (MB).
optional MemSharesLevel SharesLevel named
Specifies the memory allocation level for the vApp. This property is used in relative allocation between resource consumers. This cmdlet accepts Custom, High, Low, and Normal values.
optional Name String named
Modifies the name of the vApp.
optional NumCpuShares Int32 named
Specifies the CPU allocation level for the vApp. This property is used in relative allocation between resource consumers. This parameter is ignored unless the CpuSharesLevel parameter is set to Custom.
optional NumMemShares Int32 named
Specifies the memory allocation level for the resource pool. This property is used in relative allocation between resource consumers. This parameter is ignored unless the MemSharesLevel parameter is set to Custom.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems 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-VIServer.

Output

VMware.VimAutomation.ViCore.Types.V1.Inventory.VApp

Examples

Example 1

Get-VApp -Name MyTestVApp1 | Set-VApp -CpuSharesLevel Low -MemSharesLevel Normal

Modifies the CpuSharesLevel and MemSharesLevel properties of the MyTestVApp1 virtual appliance.

Example 2

$myvApp = Get-VApp -Location MyDatacenter1
Set-VApp -VApp $myvApp -CpuExpandableReservation:$true -CpuLimitMhz 4000 -MemExpandableReservation:$true -MemLimitGB 2

Modifies the properties of the vApps available on the MyDatacenter1 datacenter.

Related Commands

VApp

This cmdlet exports a vApp or a single virtual machine to the specified destination.

This cmdlet retrieves vApps.

This cmdlet imports OVF (Open Virtualization Format) and OVA packages. The package can contain a virtual appliance or a virtual machine.

This cmdlet moves the specified virtual appliances to a new location.

This cmdlet creates a new vApp.

This cmdlet removes vApps from the server.

This cmdlet modifies the specified vApp.

This cmdlet starts vApps.

This cmdlet stops vApps.