Skip to content

PowerCLI vCPU Report

The bosses like reports with headers, this should get you there.


Get-View -ViewType VirtualMachine -Filter @{“Runtime.PowerState” =”poweredOn”} | Where { $_.Guest.GuestFullname} | Sort Name | Select-Object Name, @{N=”vCPU”; E={$_.Config.Hardware.NumCpu}}
, @{N=”Sockets”; E={[string]([int]($_.Config.
Hardware.NumCpu / $_.Config.Hardware.
NumCoresPerSocket))}}, @{N=”Cores”; E={$_.Config.Hardware.
NumCoresPerSocket}}, @{N=”MemoryMB”; E={$_.Config.Hardware.
MemoryMB}}, @{N=”HardwareVersion”;E={$_.
Config.Version}}, @{N=”CPU HotAdd”; E={$_.Config.CpuHotAddEnabled}
},  @{N=”ConfiguredOS”;E={$_.
Guest.GuestFullName}}, @{N=”InstalledOS”;E={$_.
Summary.Config.GuestFullName}} | Export-Csv “\\server\share” -NoTypeInformation -Force