Download WMI Code Creator : http://www.microsoft.com/en-us/download/confirmation.aspx?id=8572
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM Win32_OperatingSystem WHERE Caption = 'Microsoft Windows Server 2012 Standard'",,48)
For Each objItem in colItems
Wscript.Echo "-----------------------------------"
Wscript.Echo "Win32_OperatingSystem instance"
Wscript.Echo "-----------------------------------"
Wscript.Echo "Caption: " & objItem.Caption
Next
沒有留言:
張貼留言