PowerCLI: Get number of vCPU's used in cluster

From VI-Toolkit
Jump to: navigation, search

Get number of vCPU's used in a cluster

author: Alan Renouf

Description

Based on the getNumofvCPUInCluster.pl script from William Lam, Alan wrote the Powershell variant.

Allows you to retrieve the number of vCPU's used in the cluster you provide as a parameter.

Output:

Cluster: Production
Host: vmgesx01.vmguru.com
Misc.RunningVCpuLimit: 128
Number of vCPU on host: 4
Host: vmgesx02.vmguru.com
Misc.RunningVCpuLimit: 128
Number of vCPU on host: 3
Host: vmgesx03.vmguru.com
Misc.RunningVCpuLimit: 128
Number of vCPU on host: 2
Host: vmgesx04.vmguru.com
Misc.RunningVCpuLimit: 128
Number of vCPU on host: 5 
———-
Number of vCPU in Production: 14

Location

http://www.virtu-al.net/2009/08/20/powercli-number-of-vcpus-in-a-cluster/