windowspowrshell查看cpu使用率
时间: 2023-08-13 17:03:55 浏览: 49
你可以通过以下 PowerShell 命令在 Windows 上查看 CPU 使用率:
1. 打开 PowerShell:在开始菜单中搜索“PowerShell”,然后单击打开。
2. 输入以下命令并按回车键:
```
Get-Counter '\Processor(_Total)\% Processor Time'
```
3. 这将显示 CPU 使用率的实时值。如果你想查看 CPU 使用率的历史记录,可以运行以下命令:
```
Get-Counter '\Processor(_Total)\% Processor Time' -SampleInterval 5 -Continuous | Format-Table -AutoSize
```
这将每 5 秒钟记录一次 CPU 使用率,并显示一个表格,其中包含时间戳和 CPU 使用率。
希望这可以帮到你!