Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

List VM HA restart priority

$
0
0

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


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>