IIS Server - Enumerate Installed Sties via Script

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > January 2004 > Enumerate Installed Sties via Script





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Enumerate Installed Sties via Script
Nick

2004-01-30, 4:35 am

Need help in understanding why script reports a Default
Site Installed when MMC shows none. Am I to assume that
the site is still reported in the metabase despite having
been deleted via MMC? Servers are all Win2K latest
Patches.
Thanks in advance.

Nick

<code snip>
Set objFsoIO = CreateObject("Scripting.FileSystemObject")
Set InFile = objFsoIO.OpenTextFile
(" c:\SysAdmin\RunTimes\InFiles\web_servers
.txt")
'Main Loop to Read Server List From Input File
Do While Not InFile.AtEndOfStream
strComputer = InFile.ReadLine
Set IISOBJ = getObject("IIS://" & strComputer & "/W3SVC")
For each Object in IISOBJ
if (Object.Class = "IIsWebServer") then
WScript.Echo strComputer & " WWW Site: " &
Object.Name & " - " & Object.ServerComment
end If
Next
loop
<end snip>
=?Utf-8?B?d2VibWVpc3Rlcg==?=

2004-01-30, 6:36 am

Does the script show the correct number of websites? Or is there one more (Default Website) than you run.

Try to start and stop web publishing service or reboot the server.

webmeister
http://www.webmeister.ch - intranet quick and easy
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com