< Back
Set-VMHostStartPolicy
Post
NAME 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>]
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
-Enabled <Boolean>
Indicates 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StartDelay <Int32>
Specifies a default start delay of the virtual machines in seconds.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StopAction <VmStopAction>
Specifies the default action that is applied to the virtual machines when the server stops. The valid values
are None, Suspend, PowerOff, or GuestShutDown.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StopDelay <Int32>
Specifies a default stop delay of the virtual machines in seconds.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-VMHostStartPolicy <VMHostStartPolicy[]>
Specifies the host start policy you want to modify.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-WaitForHeartBeat <Boolean>
Specifies 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-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.
Required? false
Position? named
Default value $true
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Zero or more modified VMHostStartPolicy objects
NOTES
-------------------------- 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.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... olicy.html
Get-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>]
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
-Enabled <Boolean>
Indicates 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StartDelay <Int32>
Specifies a default start delay of the virtual machines in seconds.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StopAction <VmStopAction>
Specifies the default action that is applied to the virtual machines when the server stops. The valid values
are None, Suspend, PowerOff, or GuestShutDown.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-StopDelay <Int32>
Specifies a default stop delay of the virtual machines in seconds.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-VMHostStartPolicy <VMHostStartPolicy[]>
Specifies the host start policy you want to modify.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-WaitForHeartBeat <Boolean>
Specifies 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-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.
Required? false
Position? named
Default value $true
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Zero or more modified VMHostStartPolicy objects
NOTES
-------------------------- 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.
RELATED LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... olicy.html
Get-VMHostStartPolicy