Retrieving the account IIS is using as the anonymous user account with VBScript
Posted by: Jerry Lees
I recently posted a script that retrieved the anonymous user password for a server in IIS. This script I posted, Using the IIS ADSI object to retrieve the anonymous user password for a server via VBScript, came in quite handy in a pinch, but not knowing the anonymous user account the password goes with can also be a pain.Luckily I had that piece of information in the script as well!
So, I’ve wrapped that part of the script into a function for your use as well. Below is a snippet from the script to display the user account.
Function Get_IUSR_Username(ServerName)
Dim IIsObject
Set IIsObject = GetObject (”IIS://” & ServerName & “/w3svc”)
on Error resume Next
Get_IUSR_Username = IIsObject.Get(”AnonymousUserName”)
On Error GoTo 0
End Function
Enjoy!



You must be logged-in to post a comment. Log-in/Register