- Sep 20, 2003
- 9,599
- 2
- 0
Forgive me if some of these questions are stupid but I am trying to learn.
I have been going through some of the scripting seminars on TechNet but am confused by one thing. The scripts we have been working on reference WMI objects. I know what WMI is but I don't know where he finds all the objects to reference in a script. Like this...
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objItem in colItems
Wscript.Echo "Operating System: " & objItem.Caption
Wscript.Echo "Version: " & objItem.Version
Next
Where can I find these? I looked around for a Service in WMI but I couldn't find anything.
Much appreciated!
-Por
I have been going through some of the scripting seminars on TechNet but am confused by one thing. The scripts we have been working on reference WMI objects. I know what WMI is but I don't know where he finds all the objects to reference in a script. Like this...
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objItem in colItems
Wscript.Echo "Operating System: " & objItem.Caption
Wscript.Echo "Version: " & objItem.Version
Next
Where can I find these? I looked around for a Service in WMI but I couldn't find anything.
Much appreciated!
-Por