PowerTip: Find Processes That Use A Lot of Virtual Memory

Doctor Scripto

Summary: Learn how to use Windows PowerShell to find processes that use more than 1,000 MB of virtual memory.

Hey, Scripting Guy! Question How can I produce a listing of processes on my computer that use more than 1,000 MB of virtual memory?

Hey, Scripting Guy! Answer Use the Get-Process cmdlet to return a listing of all processes. Then pipe the results to the Where-Object and choose the VM alias property. Finally, send the output to the Format-Wide cmdlet and select the name property.

Note   gps is an alias for Get-Processsort is an alias for Sort-Object? is an alias for Where-Object, and fw is an alias for the Format-Wide cmdlet.

Syntax for Windows PowerShell 3.0:

gps | sort vm | ? vm -gt 1000Mb | fw name

Syntax for Windows PowerShell 1.0 and 2.0:

gps | sort vm | ? {$_.vm -gt 1000Mb} | fw name

 

0 comments

Discussion is closed.

Feedback usabilla icon