WinCheck Script

网友投稿 910 2022-09-06

WinCheck Script

WinCheck Script

1.winCheck.bat

::###############################################################################################################::Script name: winCheck.bat::Script description: Check for Windows.::Current Release Version: 1.0.0::Script Owner: He ,Haibo::Latest editor: He, Haibo::Support platform: Windows 2019 & Windows 2016::Create date: 2021/12/1::Change log:::::Descript:::::::##############################################################################################################@echo offecho "##############No.1 Check Share###############"net shareecho "##############No.2 Check Disk Space##########"cscript //Nologo ./hard.vbsecho "##############No.3 Check Virtual Memory##########"wmic pagefile list /format:listecho "##############No.4 Check User##########"net userecho "##############No.5 Check NTP##########"W32TM /QUERY /PEERSecho "##############No.6 Check Windows Fix##########"systeminfo | find "KB"echo "##############No.7 Check Windows Update##########"net start | find "Windows Update"echo "##############No.8 Check IP Helper##########"net start | find "IP Helper"echo "##################No.9 Check network LACP############################"powershell "Get-NetLbfoTeam | findstr "TeamingMode""echo "##############No.10 Check CrashControl###########"Reg query HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/CrashControl | find "NMICrashDump"echo "##############No.11 Check 防毒##########"net start | find "AsiaInfo"echo "##############No.12 Check Windows event Log Size##########"wevtutil gl System | find "maxSize"echo "##############No.13 Check Time Zone###########"tzutil /g pause

2.hard.vbs

Set fsoobj = CreateObject("Scripting.FileSystemObject") DriversInfo = GetDriversInfo DriversInfo = Replace(DriversInfo, "|", vbCrLf) sReturn ="hard ware information" & vbCrLf & DriversInfo Wscript.Echo sReturnFunction GetDriversInfo() GetDriversInfo = "" Set drvObj = fsoobj.Drives For Each D In drvObj Err.Clear If D.DriveLetter <> "A" Then If D.isReady Then GetDriversInfo = GetDriversInfo & "partition:" & D.DriveLetter & vbCrLf GetDriversInfo = GetDriversInfo & "useable space:" & cSize(D.FreeSpace) & vbCrLf GetDriversInfo = GetDriversInfo & "total size:" & cSize( D.TotalSize) & vbCrLf GetDriversInfo = GetDriversInfo & "useage percent :" & (100*((D.TotalSize-D.FreeSpace)/D.TotalSize)) &"%" & vbCrLf GetDriversInfo = GetDriversInfo & "|" Else End If Else End If NextEnd Function Function cSize(tSize) If tSize >= 1073741824 Then cSize = Int((tSize / 1073741824) * 1000) / 1000 & " GB" ElseIf tSize >= 1048576 Then cSize = Int((tSize / 1048576) * 1000) / 1000 & " MB" ElseIf tSize >= 1024 Then cSize = Int((tSize / 1024) * 1000) / 1000 & " KB" Else cSize = tSize & "B" End IfEnd Function

windows

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Win10 WSL2搭建Linux C/C++开发环境
下一篇:深入解析NoSQL数据库的分布式算法(典型nosql数据库)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~