Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 193198

help with host report script

$
0
0

Hi

 

I have this script to get a detailed hosts report but I need to add capacity used for CPU,Memory & disk 

 

 

 

 

$Information = @()
Foreach ($ESXHost in (Get-VMHost | Get-View | Sort-Object Name)){
  $MyDetails = "" | Select-Object Name, Type, CPU, MEM
  $MyDetails.Name = $ESXHost.Name
  $MyDetails.Type = $ESXHost.Hardware.SystemInfo.Vendor+ " " + $ESXHost.Hardware.SystemInfo.Model
  $MyDetails.CPU = "PROC:" + $ESXHost.Hardware.CpuInfo.NumCpuPackages + " CORES:" + $ESXHost.Hardware.CpuInfo.NumCpuCores + " MHZ: " + [math]::round($ESXHost.Hardware.CpuInfo.Hz / 1000000, 0)
  $MyDetails.MEM = "" + [math]::round($ESXHost.Hardware.MemorySize / 1GB, 0) + " GB"
  $Information += $MyDetails
}
$Information

 

any help would be appreciated


Viewing all articles
Browse latest Browse all 193198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>