Set-VMStartPolicy
This cmdlet modifies the virtual machine start policy. Start policy defines what happens to virtual machines when the server starts up or stops.
Syntax
[-InheritStartDelayFromHost]
[-InheritStopActionFromHost]
[-InheritStopDelayFromHost]
[-InheritWaitForHeartbeatFromHost]
[-StartAction <VmStartAction>]
[-StartDelay <Int32>]
[-StartOrder <Int32>]
[-StopAction <VmStopAction>]
[-StopDelay <Int32>]
[-UnspecifiedStartOrder]
[-WaitForHeartBeat <Boolean>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VMStartPolicy[] | named |
|
Specifies the virtual machine start policy you want to modify. | optional |
|
SwitchParameter | named |
|
Indicates that the virtual machine uses the value of the StartDelay parameter of the host. | optional |
|
SwitchParameter | named |
|
Indicates that the virtual machine uses the value of the StopAction parameter of the host. | optional |
|
SwitchParameter | named |
|
Indicates that the virtual machine uses the value of the StopDelay parameter of the host. | optional |
|
SwitchParameter | named |
|
Indicates that the virtual machine uses the value of the WaitforHeartbeat parameter of the host. | optional |
|
VmStartAction | named |
|
Specifies a start action for virtual machines. It can be None or PowerOn. | optional |
|
Int32 | named |
|
Specifies a default start delay in seconds. | optional |
|
Int32 | named |
|
Specifies a number to define the virtual machines start order. | optional |
|
VmStopAction | named |
|
Specifies the default action of the virtual machine when the server stops. The valid values are None, Suspend, PowerOff, and GuestShutDown. | optional |
|
Int32 | named |
|
Specifies the default stop delay in seconds. | optional |
|
SwitchParameter | named |
|
Indicates that no order is defined for starting the virtual machines. | optional |
|
Boolean | named |
|
Indicates whether the virtual machine should start after receiving a heartbeat, ignore heartbeats and start after the StartDelay has elapsed ($true), or follow the system default before powering on ($false). When a virtual machine is next in the start order, the system either waits a specified period of time for a virtual machine to power on or it waits until it receives a successful heartbeat from a powered on virtual machine. |
Output
VMware.VimAutomation.ViCore.Types.V1.Host.VMStartPolicy.VMStartPolicy
Examples
Example 1
Retrieves the start policy of the VM virtual machine and defines that when the server starts, the virtual machine is powered on.
Example 2
Reconfigures the start policy of the VM virtual machine to inherit the values of the StopAction and StopDelay from the host.
Example 3
Retrieve the start policy of the specified virtual machine and modify its configuration settings.
Related Commands
VM
VMConsoleWindow
VMGuest
VMGuestDisk
VMGuestFile
VMQuestion
VMResourceConfiguration
VMScript