Windows操作系统作为优秀的操作系统,由开发操作系统的微软公司控制接口和设计,公开标准,因此,有大量商业公司在该操作系统上开发商业软件。 有时候我们使用Windows图形界面查看CPU和内存使用率并不方便,比如说访问远程电脑时,这时候我们可以使用Windows自带的PowerShell 查看: ?
Get-WmiObject win32_processor | Measure-Object -property LoadPercentage -Average | Select Averagechch ?
Get-WmiObject win32_OperatingSystem |%{"Total Physical Memory: {0}KB`nFree Physical Memory : {1}KB`nTotal Virtual Memory : {2}KB`nFree Virtual Memory : {3}KB" -f $_.totalvisiblememorysize, $_.freephysicalmemory, $_.totalvirtualmemorysize, $_.freevirtualmemory} ? 可以使用PowerShell远程登陆其他主机,并运行以上程序,即可以查看远方主机使用情况。 在这里也说下远程登陆的方法:
Enable-PSRemoting –Force 2.远程主机运行: Enable-PSRemoting -Force 这一步设置信任主机为“*”,Powershell将允许你与任何IP或机器名联系,公网慎用。不用时你可以运行以下命令关闭: Disable-PSRemoting 3.连接远程主机: Enter-PSSession 192.168.3.1 -Credential abc(密码)\administrator(账户) Windows操作系统对硬件支持良好。 |
温馨提示:喜欢本站的话,请收藏一下本站!