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 versionDetailed 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
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
StartRule | CIVAppStartRule[] | Specifies the start rule that you want to modify. | true | true (ByValue) | |
Confirm | SwitchParameter | If 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. | false | false | |
Group | UInt16 | Specifies 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. | false | false | |
InformationAction | ActionPreference | false | false | ||
InformationVariable | String | false | false | ||
PipelineVariable | String | false | false | ||
StartAction | CIVMStartAction | Specifies a new action to be performed on the virtual machine when the vApp starts. | false | false | |
StartDelaySeconds | UInt16 | Specifies a new amount of time to wait before performing the start action. This parameter accepts values in the range of 0 to 36000. | false | false | |
StopAction | CIVMStopAction | Specifies a new action to be performed on the virtual machine when the vApp stops. | false | false | |
StopDelaySeconds | UInt16 | Specifies a new amount of time to wait before performing the stop action. This parameter accepts values in the range of 0 to 36000. | false | false | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Return Type
Zero or more modified CIVAppStartRule objectsNotes
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.