All
Anyone can help me creating script to extract and do check of all vSphere Host HA state per cluster.
Sample output:
Cluster Name Host HA State
Cluster1 esx1.dom.com Connected (Slave)
Cluster1 esx2.dom.com Unreachable
Sample HA State:
Connected (Slave)
Running (Master)
Unreachable
N/A
Regards,
Try like this
Get-Cluster -PipelineVariable cluster |
Get-VMHost |
Select @{N='Cluster';E={$cluster.Name}},Name,@{N='State';E={$_.ExtensionData.Runtime.DasHostState.State}} |
Export-Csv .\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-Cluster -PipelineVariable cluster |
Get-VMHost |
Select @{N='Cluster';E={$cluster.Name}},Name,@{N='State';E={$_.ExtensionData.Runtime.DasHostState.State}} |
Export-Csv .\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Appreciated your help again Lucd, will give it a try and let your know 😃
Appreciated your script LucD!
It worked!