一、内存、磁盘、CPU

1、总物理内存(KB):wmic os get TotalVisibleMemorySize

Wmic获取Windows硬件资源信息

2、空闲物理内存(KB):wmic os get FreePhysicalMemory

Wmic获取Windows硬件资源信息

3、总虚拟内存(KB):wmic os get SizeStoredInPagingFiles

Wmic获取Windows硬件资源信息

4、空闲虚拟内存(KB):wmic os get FreeSpaceInPagingFiles

 Wmic获取Windows硬件资源信息

5、磁盘空间:wmic diskdrive get size

Wmic获取Windows硬件资源信息

6、剩余磁盘空间:wmic volume get Caption,freespace

Wmic获取Windows硬件资源信息

7、CPU使用率:wmic cpu get DeviceID,loadpercentage

Wmic获取Windows硬件资源信息

 

 

二、Windows开启winrm服务

winrm quickconfig
winrm e winrm/config/listener
winrm set winrm/config/service/auth @{Basic="true"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm get winrm/config

 

相关文章: