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