Powershell Process Explorer
Get count of running processes on Powershell command line: PS C:> @(Get-Process | ? { $_.ProcessName -eq “winlogon” }).Count 8 PS C:> Get Detailed view of process explorer on Powershell command line: PS C:> Get-WmiObject Win32_Process -Filter “Name like ‘%excel%’” | select-Object ProcessName, GetOwner, ProcessId, ParentProcessId, VirtualSize, CommandLine | Sort-Object $_.ProcessName -Descending | ft -auto ProcessName GetOwner ProcessId ParentProcessId VirtualSize CommandLine ———– ——– ——— ————— ———– ———– EXCEL.EXE 7780 2972 205893632 “C:Program Files (x86)Microsoft OfficeOffice12EXCEL.EXE” /e PS C:> Exporting/Saving the results to Excel: PS C:> Get-WmiObject Win32_Process | select-Object ProcessName, GetOwner, ProcessId, ParentProcessId, VirtualSize, CommandLine | Sort-Object $_.ProcessName -Descending | […]
Read more