Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In IIS6 settings for a domain, under the Directory Securty » Authentication and access control » Enable anonymous access, there's typically a user name and password supplied specifying the user credentials used for anonymous access.

As that password must be saved somewhere, how would you go about retrieving it?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

As much as I hate answering my own question....

Option Explicit
Dim objIIS, strMessage
Set objIIS = GetObject ("IIS://localhost/w3svc")
strMessage = "The metabase reports the anonymous credentials as:" _
& vbcrlf & " AnonymousUserName = " & objIIS.Get("AnonymousUserName") _
& vbcrlf & " AnonymousUserPass = " & objIIS.Get("AnonymousUserPass")
Set objIIS = Nothing
WScript.Echo strMessage

Found Here

A more generic solution (one which can retrieve the password for any domain) would be appreciated.

share|improve this answer
1  
It's OK to answer your own questions and to accept that answer. –  uSlackr Mar 3 '12 at 23:01
    
Yes, don't forget to mark it as accepted! =) –  Wesley Mar 4 '12 at 0:07
    
I'm waiting to see if someone puts up a better answer. –  tylerl Mar 4 '12 at 0:42
    
What do you mean "for any domain"? –  TristanK Mar 4 '12 at 7:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.