Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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


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.