Hi,
ITSavant. Thanks for the code. I don't know how to answer correctly Then I'm answering using my own question..
I've also found these articles
https://blogs.vmware.com/PowerCLI/2014/03/evc-powercli-5-5-r2part-2.html
VMware EVC and CPU Compatibility FAQ
Enhanced vMotion Compatibility (EVC) processor support
And If I understand how EVC WORKS, then I only need to check if the current EVC machine is lower or Equal than the destination EVC host/cluster.
A higher EVC level should support lower ones.
Then at least on my case, for CPU compatibility I will only check if VM EVC is supported into the destination EVC cluster, for mee seems that is more simple than checking lots of possibilities checking all the possible warnings related with CPU.
I've tested code that this based on the Blog script,
$viServer = $Global:DefaultViserver
$dstclustername = 'DestinationCluster'
$dstcluster = get-cluster $dstclustername
$clusterEVC= $dstcluster.EVCMode
# filter EVC Modes for Intel vendor
$availableEVCModes = $viServer.ExtensionData.Capability.SupportedEVCMode | where {$_.vendor -eq 'intel'}
# Fill hash, to quick retrieve and compare Tier value later
$EVCModes=@{}
$availableEVCModes | %{$EVCModes.$($_.Key) = $_.VendorTier}
$vm = get-vm 'TESTvmEVC' # Note must be powered on
$vmEVC = $vm.ExtensionData.Runtime.MinRequiredEVCModeKey
if ($EVCModes[$vmEVC] -le $EVCModes[$clusterEVC]) {
write-warning 'OK EVC Compatible'
} else {
write-warning 'NOT EVC compatible!!!!'
}