如何使用 PowerShell 获取 Get-Process 的所有属性?
Get-Process 仅显示默认属性。要获取 Get-Process 的所有属性,我们需要管道 Format-List * (fl *)。
Get-Process | Format-List *
输出
Name : AcroRd32 Id : 8052 PriorityClass : Normal FileVersion : 11.0.23.22 HandleCount : 616 WorkingSet : 17453056 PagedMemorySize : 114597888 PrivateMemorySize : 114597888 VirtualMemorySize : 374849536 TotalProcessorTime : 00:00:39.6562500 SI : 1 Handles : 616 VM : 374849536 WS : 17453056 PM : 114597888 NPM : 51344 Path : C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe Company : Adobe Systems Incorporated CPU : 39.65625 ProductVersion : 11.0.23.22 Description : Adobe Reader Product : Adobe Reader __NounName : Process BasePriority : 8 ExitCode : HasExited : False ExitTime : Handle : 3908 SafeHandle : Microsoft.Win32.SafeHandles.SafeProcessHandle MachineName : . MainWindowHandle : 330506 MainWindowTitle : TC Nutanix Trainer Notes drn 1_7.pdf - Adobe Reader MainModule : System.Diagnostics.ProcessModule (AcroRd32.exe) MaxWorkingSet : 1413120 MinWorkingSet : 204800 Modules : {System.Diagnostics.ProcessModule (AcroRd32.exe), System.Diagnostics.ProcessModule (ntdll.dll), System.Diagnostics.ProcessModule (wow64.dll), System.Diagnostics.ProcessModule (wow64win.dll)...} NonpagedSystemMemorySize : 51344 NonpagedSystemMemorySize64 : 51344 PagedMemorySize64 : 114597888 PagedSystemMemorySize : 493472 PagedSystemMemorySize64 : 493472 PeakPagedMemorySize : 120074240 PeakPagedMemorySize64 : 120074240 PeakWorkingSet : 147730432 PeakWorkingSet64 : 147730432 PeakVirtualMemorySize : 388337664 PeakVirtualMemorySize64 : 388337664 PriorityBoostEnabled : True PrivateMemorySize64 : 114597888 PrivilegedProcessorTime : 00:00:18.0781250 ProcessName : AcroRd32 ProcessorAffinity : 15 Responding : True SessionId : 1 StartInfo : System.Diagnostics.ProcessStartInfo StartTime : 27-12-2019 06:54:09 SynchronizingObject : Threads : {1388, 16120, 15236, 18948...} UserProcessorTime : 00:00:21.5781250 VirtualMemorySize64 : 374849536 EnableRaisingEvents : False StandardInput : StandardOutput : StandardError : WorkingSet64 : 17453056 Site : Container :
广告