View Single Post
  #13 (permalink)  
Old January 21st, 2004, 11:57 AM
pgtips pgtips is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

My final post on this subject, I promise :D

Note that the code I gave before will recover the anonymous user name and password only for the the default web. If you use different anonymous users for different web applications, you can recover those anonymous user names/passwords by changing the GetObject line in the first script I posted. For example:
Code:
set WebServiceObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/foo")
WScript.Echo "Anon User = '" & WebServiceObj.AnonymousUserName & "'"
WScript.Echo "Anon Password = '" & WebServiceObj.AnonymousUserPass & "'"
will recover the details for the 'foo' application.

Note that the IWAM details are only accessible using GetObject("IIS://LocalHost/W3SVC")
rgds
Phil