IIS inventory with VBScript

The following code provide a complete inventory of IIS sites.

Set objWWW = GetObject("IIS://localhost/W3SVC")
for each Item in ObjWWW
if (Item.Class = "IIsWebServer") then
Wscript.echo "******************************************"
For each items in item.ServerBindings
Wscript.echo items & " - " & item.ServerComment
next

Set objWWW1 = GetObject("IIS://localhost/W3SVC/" & item.name & "/ROOT")
Wscript.echo "Home Directory: " & objWWW1.path

Wscript.echo "Logs Directory: " & item.LogFileDirectory & "\w3svc" & item.name
end if
next
Share on Google Plus

About Vittorio Pavesi

    Blogger Comment
    Facebook Comment

0 commenti: