如何使用 PowerShell 查找 CPU 和 RAM 使用情况? [英] How do I find the CPU and RAM usage using PowerShell?

查看:138
本文介绍了如何使用 PowerShell 查找 CPU 和 RAM 使用情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让 PowerShell 为我提供 RAM 和 CPU 使用情况,但我不知道要使用什么 WMI 类.我的电脑有两个处理器,所以有两个处理器的信息会很有用.

I am trying to get PowerShell to give me the RAM and CPU usage, but I can't figure out what WMI class to use. My computer has two processors, so it would be useful to have the information for both of them.

推荐答案

Get-WmiObject Win32_Processor | Select LoadPercentage | Format-List

这会给您带来 CPU 负载.

This gives you CPU load.

Get-WmiObject Win32_Processor | Measure-Object -Property LoadPercentage -Average | Select Average

这篇关于如何使用 PowerShell 查找 CPU 和 RAM 使用情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆