You can also use the Get-Counter cmdlet (PowerShell 2.0):

CopyGet-Counter '\Memory\Available MBytes'
Get-Counter '\Processor(_Total)\% Processor Time'

To get a list of memory counters:

CopyGet-Counter -ListSet *memory* | Select-Object -ExpandProperty  Counter
Answer from Shay Levy on Stack Overflow
🌐
PowerShell Forums
forums.powershell.org › powershell help
Get current CPU utilization percentage - PowerShell Help - PowerShell Forums
March 25, 2024 - Hi, All. I have been trying to get the percentage of CPU utilization through PowerShell for a few days. I have tried several different methods available from my research, but I can’t find a way to get the current percen…
Discussions

Getting CPU Utilization through PS script
Hello Folks, I'm working on creating a PS script for basic server health check and planning on automating it to execute and send the health check report... More on techcommunity.microsoft.com
🌐 techcommunity.microsoft.com
1
0
March 27, 2020
cpu usage - How to track CPU Utilization of Service in windows by powershell - Stack Overflow
I usually use resource monitor to track the CPU utilization. But, now I want to track them by powershell. I just know Get-Process | Where-Object { $_.CPU -gt 100 } and (Get-Counter '\Process(*)\% More on stackoverflow.com
🌐 stackoverflow.com
Get a list of processes and their CPU usage %

Use get-counter, you need to catch values at start and end and do calculations on cooked value. Powershell isn't at fault, it is simply reading the OS counter values. On phone, can't type sample. Search for examples online and adapt something to your needs.

More on reddit.com
🌐 r/PowerShell
6
4
April 9, 2021
Command-line tool for Windows that reports CPU and Memory utilization per process?
Native: TASKLIST /V SysInternals: PSLIST /M PSLIST /X Then there's Powershell... More on reddit.com
🌐 r/sysadmin
7
1
September 8, 2022
🌐
STD Rocks
std.rocks › prog_powershell_monitoring.html
PowerShell Script to Monitor CPU, Memory, and Disk Usage
February 25, 2025 - ########################### # author : std.rocks # version : 1.0 # date : 2023.05.08 # role : monitor cpu, memory and disk usage # other : Tested on Windows 2019 Server #get current date $date = Get-Date -Format "yyyy.MM.dd_H:m" #The script will save collected information to C:\Monitoring\ as a YYYY.MM_monitor_result.csv file $csv_file = "C:\Monitoring\" + $(Get-Date -Format "yyyy.MM_") + "monitor_result.csv" ##### #CPU# ##### #Note : Use "Get-Counter -ListSet *" to get all available counters #Get cpu usage #FR : #$cpu = (Get-Counter '\Processeur(_Total)\% temps processeur').CounterSamples.Coo
🌐
Microsoft Community Hub
techcommunity.microsoft.com › microsoft community hub › communities › products › powershell › windows powershell
Getting CPU Utilization through PS script | Microsoft Community Hub
March 27, 2020 - 1. To get the average CPU utilization within a span of 180 seconds using the following:- $cpuUtil = (get-counter -Counter "\Processor(_Total)\% Processor Time" -SampleInterval 1 -MaxSamples 180 | select -ExpandProperty countersamples | select -ExpandProperty cookedvalue | Measure-Object -Average).a...
🌐
MS.Codes
ms.codes › blogs › computer-hardware › how-to-check-cpu-utilization-in-windows-using-powershell
How To Check CPU Utilization In Windows Using Powershell
February 13, 2024 - This versatile scripting language offers a range of commands and functions to gather detailed information about your system's CPU usage, including statistics on individual processes and overall utilization. Whether you're a system administrator or simply curious about your computer's performance, PowerShell provides a powerful toolset to monitor and analyze CPU utilization efficiently. To check CPU utilization in Windows using PowerShell, follow these steps: 1.
🌐
PDQ
pdq.com › blog › powershell-get-cpu-usage-for-a-process-using-get-counter
How to use PowerShell GetCounter to get CPU usage | PDQ
############################################################################# # Option A: This is if you just have the name of the process; partial name OK $ProcessName = "cpu" # Option B: This is for if you just have the PID; it will get the name for you #$ProcessPID = "6860" #$ProcessName = (Get-Process -Id $ProcessPID).Name $CpuCores = (Get-WMIObject Win32_ComputerSystem).NumberOfLogicalProcessors $Samples = (Get-Counter "\Process($Processname*)\% Processor Time").CounterSamples $Samples | Select ` InstanceName, @{Name="CPU %";Expression={[Decimal]::Round(($_.CookedValue / $CpuCores), 2)}} #############################################################################
Find elsewhere
🌐
TechTarget
techtarget.com › searchenterprisedesktop › tip › How-IT-admins-can-use-PowerShell-to-monitor-CPU-usage
How IT admins can use PowerShell to monitor CPU usage | TechTarget
July 24, 2020 - Finally, enter the sleep utility after each command execution. PowerShell's display of the average percentage of CPU · Another common use case you may find for PowerShell's CPU usage monitoring on Windows desktops is to identify the processes that are taking up the most CPU.
🌐
MS.Codes
ms.codes › blogs › computer-hardware › powershell-command-to-check-cpu-utilization
Powershell Command To Check CPU Utilization
February 13, 2024 - The following Powershell command can be used to check CPU utilization: Get-WmiObject -Query "SELECT * FROM Win32_Processor" | Select-Object -Property LoadPercentage | Format-Table -AutoSize · This command retrieves CPU utilization information ...
🌐
Xkln
xkln.net › blog › analyzing-cpu-usage-with-powershell-wmi-and-excel
Analyzing CPU Usage With Powershell, WMI, and Excel | xkln.net
For the purpose of this post I’ve written a short function in PowerShell to stress a CPU, with the ability to define how many threads we spawn, as well as automatically setting CPU affinity to match the thread count. If we don’t do this, Windows can spread the work between several cores and we may not get a good picture of what is occurring.
🌐
ManageEngine
manageengine.com › products › exchange-reports › powershell › how-to-check-cpu-and-memory-utilization-using-powershell.html
How to check cpu and memory utilization using powershell
Log in to Exchange Reporter Plus and navigate to the Monitoring > Server Monitoring > Memory Utilization. Enter the Period for report generation. Select the type of view in which you want the report to be presented. Administrators must have the following permissions if they wish to execute ...
🌐
Stack Overflow
stackoverflow.com › questions › 74703750 › how-to-track-cpu-utilization-of-service-in-windows-by-powershell
cpu usage - How to track CPU Utilization of Service in windows by powershell - Stack Overflow
I just know Get-Process | Where-Object { $_.CPU -gt 100 } and (Get-Counter '\Process(*)\% Processor Time').CounterSamples | Where-Object {$_.CookedValue -gt 5} to get CPU information of process.
🌐
Softwareg.com.au
softwareg.com.au › en-us › blogs › computer-hardware › how-to-check-cpu-utilization-in-windows-using-powershell
How To Check CPU Utilization In Windows Using Powershell – Softwareg.com.au
Once Powershell is open, type in the command "Get-Counter -Counter '\Processor(_Total)\% Processor Time'" and press Enter. You will see the CPU utilization percentage displayed in the output.
🌐
TechBloat
techbloat.com › home › how to check cpu usage using powershell [script added]
How to Check CPU Usage Using PowerShell [Script Added]
May 13, 2026 - Get-Counter is the most direct way to read performance counters from PowerShell. It uses Windows performance infrastructure and is typically the closest match to Task Manager’s general idea of CPU usage. This reads the total CPU utilization across all processors as a percentage.
🌐
Position Is Everything
positioniseverything.net › home › how to check cpu usage using powershell: a step-by-step guide
How to Check CPU Usage Using PowerShell: A Step-by-Step Guide - Position Is Everything
May 16, 2026 - ProcessName Id CPUPercent ----------- -- ---------- chrome 1248 18.55 MsMpEng 3860 7.21 Code 8184 4.82 powershell 9020 2.14 · This is a practical approximation. It accounts for the number of logical processors, so on an 8-thread CPU, one process fully using one logical processor appears close to 12.5% total CPU usage. Windows tracks process CPU time as total seconds of processor execution.
🌐
TECHEPAGES
techepages.com › home › how to find cpu utilization using powershell
How to find CPU utilization using Powershell
January 11, 2025 - The minimum filter on the WmiObject command will provide minimum CPU utilization recorded on a real time basis. The result of this command with Maximum and Minimum filters looks like the screen capture displayed below.
🌐
Microsoft Learn
social.technet.microsoft.com › Forums › en-US › f9d272ef-4fea-465d-a04d-7784547efa98 › powershell-cpu-usage-script
Powershell CPU usage script | Microsoft Learn
December 2, 2022 - Try { $Threshold = 80 $CpuLoad = (Get-WmiObject win32_processor | Measure-Object -property LoadPercentage -Average | Select Average ) Write-Host "CPU load is" $CpuLoad "%" IF($CpuLoad -gt $Threshold) { Write-Host "CPU load greater than !" $Threshold "%" Write-Host "Script Check Failed" } Else { Write-Host "Script Check Passed" } } Catch { Write-Host "Script Check Failed" }
🌐
Delft Stack
delftstack.com › home › howto › powershell › find the cpu and ram usage using powershell
How to Find the CPU and RAM Usage Using PowerShell | Delft Stack
February 12, 2024 - Let’s break down each section of the PowerShell script above to understand its functionality. ... $cpuObject = Get-WmiObject -Class Win32_Processor $cpuLoadPercentage = $cpuObject.LoadPercentage Write-Host "CPU Load Percentage: $cpuLoadPercentage" Here, the script first utilizes Get-WmiObject to query information from the Win32_Processor class, which contains details about the system’s processor.
🌐
Everything-powershell
everything-powershell.com › monitoring-memory-and-cpu-usage-on-windows-servers-with-powershell
Monitoring Memory and CPU Usage on Windows Servers with PowerShell
April 5, 2024 - Whether you are a system administrator or a developer, PowerShell can greatly simplify the process of monitoring and managing server resources. To check the memory usage on a Windows server using PowerShell, you can use the Get-Counter cmdlet.