I need to be able to "pull up" an IISVirtualWebServer by its ServerComment.
This gives me the answer, but it's really slow and inefficient (sample
version):
Set IIS = GetObject("IIS://localhost/W3SVC")
For each site in IIS
On Error Resume Next
If isNumeric(site.name) And Trim(LCase(site.servercomment)) = "domain.com"
Then
wscript.echo site.Name & " : " & site.servercomment
End If
On Error Goto 0
Next
---------------
There should be a simple way to do this in WMI with WQL, but I can't find
anywhere a list of the "tables" and "fields" to use as a reference... I've
got WMI working fine with the sample WQL, but I need to know what to select
"From" and I can't find that model.
For now, a simple WQL statement (and object to run it on) that will give the
Site Name when passed the ServerComment would be a godsend, but for the
future I want to know where to find that model.