<# DESCRIPTION: Get Hardware Stats #> $Processor = (Get-WmiObject -ComputerName HCH-TP69 -Class win32_processor -ErrorAction Stop | Measure-Object -Property LoadPercentage -Average | Select-Object Average).Average Write-Host "PROCESSOR=$Processor" $ComputerMemory = Get-WmiObject -ComputerName HCH-TP69 -Class win32_operatingsystem -ErrorAction Stop $Memory = ((($ComputerMemory.TotalVisibleMemorySize - $ComputerMemory.FreePhysicalMemory)*100)/ $ComputerMemory.TotalVisibleMemorySize) $RoundMemory = [math]::Round($Memory, 2) Write-Host "MEMORY=$ComputerMemory" Get-CimInstance win32_processor | Measure-Object -Property LoadPercentage -Average ## https://www.powershellbros.com/run-script-to-check-cpu-and-memory-utilization/