签到成功

知道了

CNDBA社区CNDBA社区

WinCheck Script

2021-12-01 16:52 988 0 原创 windows
作者: hbhe0316

1.winCheck.bathttp://www.cndba.cn/hbhe0316/article/22658http://www.cndba.cn/hbhe0316/article/22658http://www.cndba.cn/hbhe0316/article/22658

http://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.vbshttp://www.cndba.cn/hbhe0316/article/22658

http://www.cndba.cn/hbhe0316/article/22658
http://www.cndba.cn/hbhe0316/article/22658
http://www.cndba.cn/hbhe0316/article/22658
http://www.cndba.cn/hbhe0316/article/22658
http://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

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:1039405次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ