Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rhee-elten/d3b03e4b9171db4c946f64c36935df06 to your computer and use it in GitHub Desktop.
Save rhee-elten/d3b03e4b9171db4c946f64c36935df06 to your computer and use it in GitHub Desktop.
Windows Process List How To.txt
Windows Process List How To.txt
## https://www.nextofwindows.com/windows-tip-3-ways-to-print-a-list-of-running-processes
tasklist
tasklist /v /fi "sessionname eq console" /fo csv
PS C:\> get-process | out-file $env:userprofile\desktop\processes.txt
PS C:\> get-process-computername computername
PS C:\> get-process | out-printer
PS C:\> get-process chrome | export-csv $env:userprofile\desktop\processes.csv
pslist
pslist /m
pslist -t
using WMI:
WMIC path win32_process get Processid,Commandline
e.g:
wmic path win32_process get processid,commandline | sed -e "s/ \+/^I/g;"
## https://superuser.com/a/519802/95349
WMIC path win32_process get Caption,Processid,Commandline
WMIC /OUTPUT:C:\Process.txt path win32_process get Caption,Processid,Commandline
Get-WmiObject Win32_Process -Filter "name = 'perl.exe'" | where {$_.CommandLine -eq '"C:\strawberry\perl\bin\perl.exe" t/Server_PreFork.t'}
Get-WmiObject Win32_Process -Filter "name = 'perl.exe'" | where {$_.CommandLine -eq '"C:\strawberry\perl\bin\perl.exe" t/Server_PreFork.t'} | ForEach-Object { Invoke-WmiMethod -Path $_.__Path –Name Terminate }
List all processes running on \\workstation64:
C:\> SC \\workstation64 start RemoteRegistry
C:\> pslist \\workstation64
Command Line utility to see list of tasks CPU Usage, Memory, and execute
typeperf "\238(*)\6" -sc 1
typeperf "\238(*)\6" -si 10 -sc 5
typeperf "\238(_Total)\6" -si 10 -sc 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment