The VBScript Network and Systems Administrator's Cafe

Feb 26 2009   8:00AM GMT

Retrieving the account IIS is using as the anonymous user account with VBScript



Posted by: Jerry Lees
Tags:
iis
System Administration
Systems Administration
systems management
VBScript
VBScript Functions
web sites
web tools
working with objects

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!

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: