Hello, I'm trying to make PowerCLI script for Fault tolerance check. Especially on which host is current VM running. But I cant find any cmdlets. Virtual Machine VMHost.Name doesn't work, because it throws both hosts
The best should be:
Secondary VM location
(this can be seen from vCenter GUI)
or something else how to identify.
Thanks for any advice.
Jiri
Something like this?
Get-VM | where{$_.ExtensionData.Config.FtInfo} |
Select Name,
@{N='Role';E={
if($_.ExtensionData.Config.FtINfo.Role -eq 1){'Primary'}else{'Secondary'}}},
@{N='MHost';E={$_.VMHost.Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Something like this?
Get-VM | where{$_.ExtensionData.Config.FtInfo} |
Select Name,
@{N='Role';E={
if($_.ExtensionData.Config.FtINfo.Role -eq 1){'Primary'}else{'Secondary'}}},
@{N='MHost';E={$_.VMHost.Name}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you! It works!
Regards
Jiri