parsed.org

Tips by tag: wpsh

Windows PowerShell by xinu on Jun 16, 2008 04:33 PM

My first foray into Windows PowerShell hasn't been too painful. It looks a lot like shell scripting and a bit like SQL with the 'where' cmdlets:

PS C:\WINDOWS> ps | where {$_.handles -ge 200 -and $_.name -ne 'svchost'} | sort -Descending handles

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
   4575      70   147404      87676   642   783.97  10888 OUTLOOK
   2452       3     2720       3984    35     4.20    700 LVPrcSrv
   1670      47    67200      40188   207    59.39   5964 iTunes
   1659      13   150800      58608  1245    44.03   8720 javaw
...
powershellwindowswpsh
RSS