VMware Cloud Community
Tamsuolis
Contributor
Contributor
Jump to solution

How to set highest HARestartPriority for VM's via PowerCLI

Hello,

Recently I get a task to write PowerCLI script which will set HARestartPriority to "Highest (not High!) on specific VM's. Highest value as an option was added in vSphere 6.5, but I can set it only via GUI. Via PowerCLI by default I can set only High, Medium, Low, Disabled and ClusterDefault. Is it possible somehow force PowerCLI to set Highest option?

Thank you!

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

In my PowerCLI version 6.5.4, I have the highest option on the Set-Cluster -HARestartPriority parameter.

$clusterName = 'MyCluster'

Get-Cluster -Name $clusterName | Set-Cluster -HARestartPriority Highest


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

In my PowerCLI version 6.5.4, I have the highest option on the Set-Cluster -HARestartPriority parameter.

$clusterName = 'MyCluster'

Get-Cluster -Name $clusterName | Set-Cluster -HARestartPriority Highest


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Tamsuolis
Contributor
Contributor
Jump to solution

It seems that they added "Highest" option in newer version Smiley Happy My current PowerCLI version 6.5

Thank you Luc!

0 Kudos