Determine if Hyper-Threading is enabled
Function Check-HyperThreading($ComputerName){ # Get the Processor information for the computer $Proc = Get-WMIObject Win32_Processor -ComputerName $ComputerName # Determine if hyper-threading is enabled $CPUCount = @($Proc).count $NumberOfLogicalProcessors = $($Proc | measure-object -Property NumberOfLogicalProcessors -sum).Sum $NumberOfCores = $($Proc | measure-object -Property NumberOfCores -sum).Sum # Output the results as a PS object [pscustomobject]@{ Computer = $ComputerName CPUCount = $CPUCount NumberOfLogicalProcessors = $NumberOfLogicalProcessors NumberOfCores...
Get Processor Utilization Percentage
Get-WmiObject win32_processor -ComputerName $computer | Measure-Object -property LoadPercentage -Average | Select @{Label = "Computer"; Expression = {$computer}},@{Label = "CpuUsage"; Expression = {$_.Average}}
Get Memory Utilization Percentage
Get-WmiObject Win32_OperatingSystem -ComputerName $computer | Select @{Label = "Computer"; Expression = {$computer}}, @{Label = "MemoryUsage"; Expression = {100 - [math]::Round(($_.FreePhysicalMemory/$_.TotalVisibleMemorySize)*100,0)}}