0

I know Windows equivalent of "ps aux" is tasklist which works well on my win10

enter image description here

per What is the Windows equivalent of "wc -l"? Windows equivalent of wc -l is find /c /v "".

When I tried combine them together, I got

FIND: Parameter format not correct

enter image description here

how do I use powershell to get the number of processes running on win10?

JJJohn
  • 515

2 Answers2

2

(Get-Process).Count

and, as a bonus:

(Get-Process|Select-Object -ExpandProperty Threads).Count

Run it in CMD (as an administrator) as : powershell "(Get-Process|Select-Object -ExpandProperty Threads).Count"

Example output: enter image description here

Credit: harrymc

More info over at https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.2

0

tasklist | Measure-Object -l

and I still got my pipe, so I feel good ;)