jjeffords
asked on
Script to change exchange settings in outlook
Ok guys basically what i had happen was an old mail server go out on me last night and i luckily had the other up with the mailboxes moved over BUT now since the old server is offline it wont resolve everyone to the right server. Does anyone know how to write a script to change a users outlook settings to switch exchange servers? Please help ! lol
Thanks in Advance !!
Thanks in Advance !!
ASKER
Well DNS will fix it but it is more less a bandaid to patch up the problem.
I was looking for a way to change the setting
I was looking for a way to change the setting
ok, this is a quick script I managed to write. I haven't tested it though. you might want to try it on a test server first.
This script just updates one of the user's xchange server. let me know if it works for you, ill write a loop around it so that it enumerates all the users. you must change the rootdse, user name and machine name ofcourse.
Set ad= GetObject("LDAP://server.c om/CN=John _doe,OU=GE N,OU=Users ,OU=MRC,OU =CRI,OU=UK ,DC=ad,DC= server,DC= com")
WScript.Echo "Old Value : " & ad.Get("msexchhomeserverna me")
ad.put "msexchhomeservername","/O =YOURDOMAI N/OU=SRI/c n=Configur ation/cn=S ervers/cn= NEWSERVER"
WScript.Echo "Changed!"
let me know if it works..
This script just updates one of the user's xchange server. let me know if it works for you, ill write a loop around it so that it enumerates all the users. you must change the rootdse, user name and machine name ofcourse.
Set ad= GetObject("LDAP://server.c
WScript.Echo "Old Value : " & ad.Get("msexchhomeserverna
ad.put "msexchhomeservername","/O
WScript.Echo "Changed!"
let me know if it works..
oops... sorry forgot to commit the changes at the end.
heres the updated listing
Set ad= GetObject("LDAP://server.c om/CN=John _doe,OU=GE N,OU=Users ,OU=MRC,OU =CRI,OU=UK ,DC=ad,DC= server,DC= com")
WScript.Echo "Old Value : " & ad.Get("msexchhomeserverna me")
ad.put "msexchhomeservername","/O =YOURDOMAI N/OU=SRI/c n=Configur ation/cn=S ervers/cn= NEWSERVER"
ad.setInfo
WScript.Echo "Changed!"
heres the updated listing
Set ad= GetObject("LDAP://server.c
WScript.Echo "Old Value : " & ad.Get("msexchhomeserverna
ad.put "msexchhomeservername","/O
ad.setInfo
WScript.Echo "Changed!"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
anyways the soln you asked for would be to change the Active Directory entries of the Users. is this what you are looking for?