HELP! Need VB script to remove the email address from General Tab in AD
First post.. Hopefully I can gain some information as well as contribute....
Right now, I am facing this:
I have a mixed AD setup.. Meaning servers with 2003 and servers with 2008...
We have a process of terminating users.. Their mailbox gets archived, moved to termed OU, ect... However, each user is retaining the EMAIL address on the general tab of the AD properties of each user. What I am needing is a VB script that will clear everybodies EMAIL from the General tab. I have tried this:
Const ADS_PROPERTY_CLEAR = 1
Set objContainer = GetObject _
objContainer.PutEx ADS_PROPERTY_CLEAR, "mail", 0
That does not work. Well.... It executes without any errors. But when I check users email portion on the general tab within the terminated users OU, they still have the mail address filled in. I HAVE waited, refreashed, and replicated all DC......