miladmeh8
Enthusiast
Enthusiast

how to get value of das.respectvmvmantiaffinityrules

Hi All,

I need a PowerCLI command to get the information whether the value of this configuration (das.respectvmvmantiaffinityrules) is true or false? i know the command get-advancedconfiguration but  it just shows the current advanced configuration.

I have a vCenter server 6.5 which has been upgraded from 6.0 and it seems when i start to run virtual machines it doesn't respect these rules and sometimes vms located in the same host at first and then with migration it goes to the seprated host.

Thanks

Tags (2)
0 Kudos
1 Reply
LucD
Leadership
Leadership

You could do something like this

Get-Cluster |

Select Name,

    @{N='respectvmvmantiaffinityrules';E={

        $adv = Get-AdvancedSetting -Entity $_ -Name das.respectvmvmantiaffinityrules

        if($adv){[Boolean]$adv.Value}else{$false}

    }}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos