如何使用 PowerShell 获取 CIM 实例的正在运行的进程?
powershellmicrosoft technologiessoftware & coding
您还可以使用 Get-CimInstance 命令(该命令与 WMI 对象使用的类 Win32_Process 相同)显示计算机上正在运行的进程。
命令
Get-CimInstance Win32_Process
输出
ProcessId Name HandleCount WorkingSetSize VirtualSize --------- ---- ----------- -------------- ----------- 0 System Idle Process 0 8192 8192 4 System 6387 970752 5177344 96 Registry 0 76951552 173195264 568 smss.exe 53 495616 2203359674368 800 csrss.exe 883 4653056 2203416825856 896 csrss.exe 817 5349376 2203449389056 920 wininit.exe 156 4886528 2203387420672 956 winlogon.exe 264 9486336 2203423092736 8 services.exe 838 10129408 2203391979520 684 lsass.exe 1870 20848640 2203418796032

