juragan
asked on
Adding Proxy Addresses in Exchange 2003 by script
I need to add additional proxy-addresses to a bunch ofl users via a script.
The user list is available in a CSV file with the following format:
primarysmtp@domain1.com, proxyaddress@domain2.com
No 'samAccount' or 'ADSpath' attributes there.
How do you find the ADSpath of the user, given only his primary SMTP e-mail address? You need the ADSpath in order to append the new secondary smtp address, don't you?
Would appreciate if anyone can assist me with the script.
Thanks!
The user list is available in a CSV file with the following format:
primarysmtp@domain1.com, proxyaddress@domain2.com
No 'samAccount' or 'ADSpath' attributes there.
How do you find the ADSpath of the user, given only his primary SMTP e-mail address? You need the ADSpath in order to append the new secondary smtp address, don't you?
Would appreciate if anyone can assist me with the script.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The script works great! Thanks!
You're welcome. Have a good christmas :)
Chris
ASKER
Merry Christmas! :)
If I I wanted to run this against an OU, I can replace the LDAP://RootDSE with LDAP://ou=Finance,dc=fabri kam,dc=com , right?
Not quite, no.
You would need to modify these lines:
Set objRootDSE = GetObject("LDAP://RootDSE"
objCommand.CommandText = "SELECT aDSPath, mail " &_
"FROM 'LDAP://" & objRootDSE.Get("defaultNam
Set objRootDSE = Nothing
All RootDSE does for us is find the "DC=fabrikam,DC=com" portion of the domain without us having to write it. In your case you want to change the CommandText to this:
objCommand.CommandText = "SELECT aDSPath, mail " &_
"FROM 'LDAP://ou=Finance,dc=fabr
That is used as the base for the search, the connection point. Because we set ADS_SCOPE_SUBTREE it will go from that point to any child OU.
Chris
ASKER
Thanks for the script. I just came back from a trip, so I'll let you know soon how it is going :)
- J -