PowerCLI Reference

Set-CIVApp

Synopsis

This cmdlet modifies the configuration of the specified vApps in the cloud.

Syntax

Set-CIVApp [-VApp] <CIVApp[]> [-Name <String>] [-Description <String>] [-Owner <CIUser>] [-Server <CIServer[]>] [-RunAsync] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-CIVApp [-VApp] <CIVApp[]> [-Server <CIServer[]>] [-RunAsync] -DiscardSuspendedState [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Set-CIVApp [-VApp] <CIVApp[]> [-Server <CIServer[]>] -RenewLease [-RuntimeLease <TimeSpan>] [-StorageLease <TimeSpan>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVApp
Import-CIVApp
New-CIVApp
Remove-CIVApp
Start-CIVApp
Stop-CIVApp
Restart-CIVApp
Suspend-CIVApp

Detailed Description

This cmdlet modifies the configuration of the specified vApps in the cloud.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VAppCIVApp[]Specifies the vApp that you want to configure.truetrue (ByValue)
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 configure.falsefalse
DiscardSuspendedStateSwitchParameterIndicates that you want to discard the suspended state of the specified vApp and all its virtual machines.truefalse
InformationActionActionPreferencefalsefalse
InformationVariableStringfalsefalse
NameStringSpecifies a new name for the vApp you want to configure.falsefalse
OwnerCIUserSpecifies a new owner for the vApp you want to configure.falsefalse
PipelineVariableStringfalsefalse
RenewLeaseSwitchParameterIndicates that you want to renew the leases of the vApp. Specifying the RenewLease parameter resets the current values of the RuntimeLease and StorageLease parameters.truefalse
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 VMware PowerCLI console.falsefalse
RuntimeLeaseTimeSpanSpecifies the maximum running time for the vApp before vCloud Director stops it automatically. If you do not specify this parameter, the current value is reset. To specify that the lease is unlimited, pass $null.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. If you do not specify this parameter, the current value is reset. To specify that the lease is unlimited, pass $null.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Zero or more modified CIVApp objects

Notes

Examples

-------------- Example 1 --------------

$myVApps = Get-CIVApp -Name 'MyVApp*'
$myVApps | Set-CIVApp -Description 'This is one of my VApps.'

Retrieves all vApp with names starting with MyVapp and changes their descriptions to "This is one of my vApps."

-------------- Example 2 --------------

Set-CIVApp -VApp 'MyVApp*' -DiscardSuspendedState

Discards the suspended state for all vApps with names starting with MyVapp.

-------------- Example 3 --------------

$runtimeTimeSpan = New-Object System.Timespan 1,2,3 #one hour, two minutes, three seconds
Set-CIVApp -VApp 'myVApp*' -RenewLease -RuntimeLease $runtimeTimeSpan

Renews the runtime lease for all vApps with names starting with MyVapp and sets the runtime lease to one hour, two minutes and three seconds.


Copyright © VMware, Inc. All rights reserved.