PowerCLI Reference

Set-VMHostStartPolicy

Synopsis

This cmdlet modifies the host default start policy.

Syntax

Set-VMHostStartPolicy [-VMHostStartPolicy] <VMHostStartPolicy[]> [-Enabled <Boolean>] [-StartDelay <Int32>] [-StopAction <VmStopAction>] [-StopDelay <Int32>] [-WaitForHeartBeat <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
Get-VMHostStartPolicy

Detailed Description

This cmdlet modifies the host default start policy. Start policy defines what happens to virtual machines when the server starts up or stops.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMHostStartPolicyVMHostStartPolicy[]Specifies the host start policy 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
EnabledBooleanIndicates that the service that controls the host start policies is enabled. If it is enabled, the default start policies and the start policies of the specified hosts are applied. If disabled, no start policy is applied.falseFalse
StartDelayInt32Specifies a default start delay of the virtual machines in seconds.falseFalse
StopActionVmStopActionSpecifies the default action that is applied to the virtual machines when the server stops. The valid values are None, Suspend, PowerOff, or GuestShutDown.falseFalse
StopDelayInt32Specifies a default stop delay of the virtual machines in seconds.falseFalse
WaitForHeartBeatBooleanSpecifies whether the virtual machines should start after receiving a heartbeat from the host, 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 host to power on or it waits until it receives a successful heartbeat from a powered-on host.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 VMHostStartPolicy objects

Notes

Examples

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

Get-VMHost Host | Get-VMHostStartPolicy | Set-VMHostStartPolicy -Enabled:$true -StartOrder 2 -StartDelay 300 -StopAction GuestShutDown -StopDelay 300

Retrieves the start policy of the Host host and modifies its configuration settings.

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

Get-VMHost Host | Get-VMHostStartPolicy | Set-VMHostStartPolicy -WaitForHeartbeat

Retrieves the start policy of the Host host and modifies its configuration settings, so that virtual machines on the specified host wait for the host heartbeat.


Copyright © VMware, Inc. All rights reserved.