ITeye博客

wmic 获取硬件及360安装情况的脚本

Cash · 2020-04-09 15:52 · IT · 操作系统 · Markdown

近期在搞电脑配置盘点,为方便员工自查信息,编写已下代码提升采集效率;

原理:通过windows系统 wmic 获取硬件及360安装情况,编写bat代码

@echo off echo 开始获取计算机信息 echo step 0 clear D:\PCinfo.html file!!! del /a/f/q "D:\PCinfo.html" echo step 1 get mainboard information wmic COMPUTERSYSTEM get Manufacturer,Model /format:htable >> D:\PCinfo.html echo step 2 get CPU information wmic cpu get Name /format:htable >> D:\PCinfo.html echo step 3 get memory information wmic memorychip get capacity,speed /format:htable >> D:\PCinfo.html echo step 4 get diskdrive information wmic diskdrive get model,size /format:htable >> D:\PCinfo.html echo step 5 get network interface card information wmic nic where "speed is not null and Manufacturer <> 'Microsoft'" get macaddress /format:htable >> D:\PCinfo.html echo step 6 get OS version information wmic os get Caption /format:htable >> D:\PCinfo.html echo step 7 get ip information wmic nicconfig get ipaddress /format:htable >> D:\PCinfo.html echo step 8 get 360 information wmic process where name="zhudongfangyu.exe" get name,creationdate /format:htable >> D:\PCinfo.html

echo 已获取计算机信息,请查看D:\PCinfo.html文件,并按任意键退出..... pause>nul

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。