Set-CIVAppStartRule Command | Vmware PowerCLI Reference

Set-CIVAppStartRule

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.

Syntax

Set-CIVAppStartRule
-StartRule < CIVAppStartRule[] >
[-Group < UInt16 > ]
[-StartAction < CIVMStartAction > ]
[-StartDelaySeconds < UInt16 > ]
[-StopAction < CIVMStopAction > ]
[-StopDelaySeconds < UInt16 > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
StartRule CIVAppStartRule[] named
  • pipeline
Specifies the start rule that you want to modify.
optional Group UInt16 named
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.
optional StartAction CIVMStartAction named
Specifies a new action to be performed on the virtual machine when the vApp starts.
optional StartDelaySeconds UInt16 named
Specifies a new amount of time to wait before performing the start action. This parameter accepts values in the range of 0 to 36000.
optional StopAction CIVMStopAction named
Specifies a new action to be performed on the virtual machine when the vApp stops.
optional StopDelaySeconds UInt16 named
Specifies a new amount of time to wait before performing the stop action. This parameter accepts values in the range of 0 to 36000.

Output

VMware.VimAutomation.Cloud.Types.V1.CIVAppStartRule

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.

Related Commands

CIVApp

This cmdlet retrieves virtual appliances in the cloud.

This cmdlet imports a virtual machine from the underlying vSphere to the cloud.

This cmdlet creates a new vApp.

This cmdlet removes vApps from the cloud.

This cmdlet restarts the specified vApp.

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

This cmdlet starts the specified vApp.

This cmdlet stops the specified vApp.

This cmdlet suspends the specified vApp.

CIVAppGuest

This cmdlet restarts the guest operating systems of all virtual machines in the specified vApp.

This cmdlet shuts down the guest operating systems of all virtual machines in the specified vApp.

CIVAppNetwork

This cmdlet retrieves the vApp networks available on a vCloud Director server.

This cmdlet creates a new vApp network.

This cmdlet removes the specified vApp networks if they are not in use.

This cmdlet modifies the configuration of the specified vApp networks.

CIVAppStartRule

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

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

CIVAppTemplate

This cmdlet retrieves vApp templates.

This cmdlet imports a virtual machine or an OVF package from vCenter Server to vCloud Director as a vApp template.

This cmdlet creates a new vApp template.

This cmdlet removes the specified vApp template.

This cmdlet modifies the configuration of the specified vApp template.