复制代码
- Set objWMIService = GetObject("winmgmts:\\Localhost\root\MicrosoftIISv2")
- Set colItems = objWMIService.ExecQuery("SELECT * FROM IIsWebInfo", "WQL", 48)
- strVersion = ""
- For Each objItem In colItems
- strVersion = "IIS Version: " & objItem.MajorIIsVersionNumber & "." & objItem.MinorIIsVersionNumber
- Next
- WScript.Echo strVersion
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |