Hi all
Is there a way to list the HA restart priority for all the VMs in a cluster? Maybe with PowerCLI?
I found some information about a powershell possibility for ESXi 5.1/vSphere 5.1 but I'm still running 4.1.
I found something in the community but I was not able to add a command to export it into a list. Copy/paste is a possibility but not a great automation level.
$cluster = Get-Cluster MyCluster
Write-Host "Default VM restart" $cluster.HARestartPriority
if($cluster.ExtensionData.Configuration.DasVmConfig){
$cluster.ExtensionData.Configuration.DasVmConfig | %{
Write-Host "VM" (Get-View $_.Key).Name "Restart priority" $_.RestartPriority
}
}
Can anyone help me?
Thanks!
Remo