WinCheck Script

1.winCheck.bathttps://www.cndba.cn/hbhe0316/article/22658https://www.cndba.cn/hbhe0316/article/22658https://www.cndba.cn/hbhe0316/article/22658

https://www.cndba.cn/hbhe0316/article/22658
https://www.cndba.cn/hbhe0316/article/22658
https://www.cndba.cn/hbhe0316/article/22658
https://www.cndba.cn/hbhe0316/article/22658
::###############################################################################################################
::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 off
echo "##############No.1 Check Share###############"
net share

echo "##############No.2 Check Disk Space##########"
cscript //Nologo ./hard.vbs

echo "##############No.3 Check Virtual Memory##########"
wmic pagefile list /format:list

echo "##############No.4 Check User##########"
net user

echo "##############No.5 Check NTP##########"
W32TM /QUERY /PEERS

echo "##############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.vbshttps://www.cndba.cn/hbhe0316/article/22658https://www.cndba.cn/hbhe0316/article/22658https://www.cndba.cn/hbhe0316/article/22658

Set fsoobj = CreateObject("Scripting.FileSystemObject")
 DriversInfo = GetDriversInfo
 DriversInfo = Replace(DriversInfo, "|", vbCrLf)
 sReturn ="hard ware information" & vbCrLf & DriversInfo
 Wscript.Echo sReturn
Function 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
   Next
End 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 If

End Function

版权声明:本文为博主原创文章,未经博主允许不得转载。

windows

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值