2

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?

tylerl
  • 15,055
  • 7
  • 51
  • 72

1 Answers1

3

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.

tylerl
  • 15,055
  • 7
  • 51
  • 72