VMware Cloud Community
Kentril
Contributor
Contributor
Jump to solution

FT CMDlet PowerCLI

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 Smiley Sad

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

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

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

Kentril
Contributor
Contributor
Jump to solution

Thank you! It works!

Regards

Jiri

0 Kudos