#MEM使用率
$RAM= Get-WMIObject Win32_PhysicalMemory | Measure -Property capacity -Sum | %{$_.sum/1Mb}
Get-WmiObject Win32_PerfFormattedData_PerfProc_Process `
| sort-object -Property WorkingSetPrivate `
| Where-Object { $_.name -inotmatch '_total|idle' } `
| ForEach-Object {
"{0,-1}:{1,-1}:{2,-1}%" -f`
$_.Name,$_.CreatingProcessID,([math]::Round(($_.WorkingSetPrivate/1Mb)/$RAM*100,2))} `
| Select-Object -Last 3
08-13
4823
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交