13
2022
08
16:34:51

windows系统硬件信息收集cmd脚本



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

获取windows系统硬件信息收集cmd脚本

chcp 65001

set file="host_message.txt"

echo 获取ip地址:  >>%file%

ipconfig |findstr IPv4>>%file%


echo. >>%file%

echo 获取主机名,系统版本,内存容量等信息: >> %file%

systeminfo |findstr "Host OS Memory"  >> %file%


echo. >>%file%

echo 获取硬盘容量(单位:B):  >> %file%

wmic DiskDrive get Size >> %file%


::echo. >>%file%

::echo 获取内存容量:  >>%file%

::wmic memorychip list brief >> %file%

::systeminfo | findstr Memory >> %file%


echo. >>%file%

echo 获取cpu型号: >> %file%

wmic cpu list brief | findstr  CPU >>  %file%


::systeminfo

------------------------



优化版本:

chcp 65001

mkdir d:\sysinfo\

del  d:\sysinfo\host_message.txt

del  d:\sysinfo\host_message.txt

set file="host_message.txt"


echo. >>d:\sysinfo\%file%

echo 获取主机名,系统版本,内存容量等信息: >> d:\sysinfo\%file%

systeminfo |findstr "Host OS Memory"  >>d:\sysinfo\%file%


echo. >>d:\sysinfo\%file%

echo 获取cpu型号: >> d:\sysinfo\%file%

wmic cpu list brief | findstr  CPU >>  d:\sysinfo\%file%


echo. >>d:\sysinfo\%file%

echo 获取内存条数量:  >>d:\sysinfo\%file%

wmic /output:temp.txt memorychip list brief

type temp.txt >> d:\sysinfo\%file%


echo. >>d:\sysinfo\%file%

echo 获取硬盘信息(单位:Byte):  >> d:\sysinfo\%file%

wmic diskdrive get caption,size,interfacetype,MediaType  >> d:\sysinfo\%file%

Wmic logicaldisk get Caption, Description,FileSystem,DriveType, VolumeName, FreeSpace ,Size >> d:\sysinfo\%file%

:: DriveType: 2=移动磁盘、3=本地磁盘、5=光驱。

fsutil volume diskfree c: >> d:\sysinfo\%file%




echo. >>d:\sysinfo\%file%

echo 当前计算ip/mac地址:  >>d:\sysinfo\%file%

wmic /output:d:\sysinfo\ipmac.txt nicconfig get IPAddress

type d:\sysinfo\ipmac.txt >> d:\sysinfo\%file%




::systeminfo



本文链接:http://www.hqyman.cn/post/2642.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: