PowerCLI to get Virtual to Physical CPU Ratio
I was in a meeting today, and was asked, “What is the current virtual to physical CPU ratio?” I didn’t have an answer for this question, so I asked PowerCLI for the answer.
(get-cluster $ClusterName | Get-vm | Where Powerstate -eq “PoweredOn” | Measure NumCpu -sum).sum / (((Get-cluster $ClusterName | Get-vmhost).extensiondata.summary.hardware | Measure -Property numCpuCores -Sum).sum)
This will be a handy script that can be ran rather quickly. … Continue reading