I needed to double check the CPU Affinity settings I had set on some VM’s which I wanted tied to the cores in my host, just to double check I had these correct the following one liner works a treat….
Get-Cluster “My Cluster” | Get-VM | Get-View | foreach {Write-output $_.Name $_.Config.CpuAffinity.AffinitySet}
update ESXi 6.0 (and presumably later):
get-vm | foreach { write-output $_.name $_.extensiondata.config.CpuAffinity.AffinitySet}
thanks, this is exactly what i was looking for.