PowerCLI Reference

Set-CIVAppStartRule

Synopsis

This cmdlet modifies the start rules for virtual machines in the specified vApp.

Syntax

Set-CIVAppStartRule [-StartRule] <CIVAppStartRule[]> [-Group <UInt16>] [-StartAction <CIVMStartAction>] [-StartDelaySeconds <UInt16>] [-StopAction <CIVMStopAction>] [-StopDelaySeconds <UInt16>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-CIVAppStartRule

Detailed Description

This cmdlet modifies the start rules for virtual machines in the specified vApp. Note: You must specify at least one of the Group, StartAction, StartDelaySeconds, StopAction, or StopDelaySeconds parameters.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
StartRuleCIVAppStartRule[]Specifies the start rule that you want to modify.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
GroupUInt16Specifies a new start group for the virtual machine whose start rule you want to modify. The value you pass to this parameter represents the position of the group in the start queue of the vApp. The smaller the number, the sooner vCloud Director powers on the virtual machines in the group after you start the vApp. When you stop the vApp, vCloud Director stops the virtual machines in the reverse order.falsefalse
InformationActionActionPreferencefalsefalse
InformationVariableStringfalsefalse
PipelineVariableStringfalsefalse
StartActionCIVMStartActionSpecifies a new action to be performed on the virtual machine when the vApp starts.falsefalse
StartDelaySecondsUInt16Specifies a new amount of time to wait before performing the start action. This parameter accepts values in the range of 0 to 36000.falsefalse
StopActionCIVMStopActionSpecifies a new action to be performed on the virtual machine when the vApp stops.falsefalse
StopDelaySecondsUInt16Specifies a new amount of time to wait before performing the stop action. This parameter accepts values in the range of 0 to 36000.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 CIVAppStartRule objects

Notes

Examples

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

$myVApp = Get-CIVApp 'MyVApp'
$myVM2 = Get-CIVM -Name 'MyVM2' -VApp $myVApp
$myVM2StartRule = Get-CIVAppStartRule -VApp $myVApp -VM $myVM2
Set-CIVappStartRule -StartRule $myVM2StartRule -StartDelaySeconds 10

Modifies the delay of the start action that is performed on the specified virtual machine when the specified vApp starts.

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

$myVApp = Get-CIVApp 'MyVApp'
$myVM2 = Get-CIVM -Name 'MyVM2' -VApp $myVApp
$myVM2StartRule = Get-CIVAppStartRule -VApp $myVApp -VM $myVM2
Set-CIVAppStartRule -StartRule $myVM2StartRule -StartAction None

Sets the start action for the specified virtual machine to none. When the vApp starts, the virtual machine will not power on.


Copyright © VMware, Inc. All rights reserved.