Board logo

标题: [技术讨论] [分享]VBS查看IIS版本号 [打印本页]

作者: DAIC    时间: 2014-5-5 17:13     标题: [分享]VBS查看IIS版本号

  1. Set objWMIService = GetObject("winmgmts:\\Localhost\root\MicrosoftIISv2")
  2. Set colItems = objWMIService.ExecQuery("SELECT * FROM IIsWebInfo", "WQL", 48)
  3. strVersion = ""
  4. For Each objItem In colItems
  5.     strVersion = "IIS Version: " & objItem.MajorIIsVersionNumber & "." &  objItem.MinorIIsVersionNumber
  6. Next
  7. WScript.Echo strVersion
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2