Posted by: Jerry Lees
iis, System Administration, Systems Administration, Toolkit, VBScipt, VBScript, VBScript Functions, working with objects
I recently had to change the anonymous user account for a change request for a site in IIS, but unfortunately the change did not work and we had to roll it back. However, I didn’t have and wouldn’t have known the account’s password since IIS and windows changes it periodically.
So, out came the scripting tool belt and I found that I had a script written previously that let me get the anonymous user account and password through the IIS ADSI object.
Below is a snippet from the script to display the password.
Set IIsObject = GetObject (“IIS://” & ServerName & “/w3svc”)
on Error resume Next
Get_IUSR_Password = IIsObject.Get(“AnonymousUserPass”)
On Error GoTo 0