How to get number of active processes and threads running using command-line?

10,347

Using PowerShell, the following two commands will get that information:

Number of processes running:

(Get-Process).Count

Number of threads running:

(Get-Process|Select-Object -ExpandProperty Threads).Count
Share:
10,347

Related videos on Youtube

Vinodh Gowda
Author by

Vinodh Gowda

Updated on September 18, 2022

Comments

  • Vinodh Gowda
    Vinodh Gowda over 1 year

    I should get the number of active processes and active threads running in my server or computer using command-line.. I don't want to list all the processes or threads running, I need them in numbers.

  • Vinodh Gowda
    Vinodh Gowda about 5 years
    The command works perfectly on powershell but it doesn't work in cmd..Is there any specific command for cmd?
  • harrymc
    harrymc about 5 years
    Run it in CMD as : powershell "(Get-Process|Select-Object -ExpandProperty Threads).Count".