Script to change exchange settings in outlook

Posted on 2004-10-07
Last Modified: 2010-04-17
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 !!
Question by:jjeffords
  • 4
LVL 11

Expert Comment

ID: 12257147
ummm.. may be i sound stupid.. but wont changing the dns entry solve your problem!?

anyways the soln you asked for would be to change the Active Directory entries of the Users. is this what you are looking for?

Author Comment

ID: 12257878
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
LVL 11

Expert Comment

ID: 12258187
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://,OU=GEN,OU=Users,OU=MRC,OU=CRI,OU=UK,DC=ad,DC=server,DC=com")
WScript.Echo "Old Value : " & ad.Get("msexchhomeservername")
ad.put "msexchhomeservername","/O=YOURDOMAIN/OU=SRI/cn=Configuration/cn=Servers/cn=NEWSERVER"
WScript.Echo "Changed!"

let me know if it works..
LVL 11

Expert Comment

ID: 12258222
oops... sorry forgot to commit the changes at the end.

heres the updated listing

Set ad= GetObject("LDAP://,OU=GEN,OU=Users,OU=MRC,OU=CRI,OU=UK,DC=ad,DC=server,DC=com")
WScript.Echo "Old Value : " & ad.Get("msexchhomeservername")
ad.put "msexchhomeservername","/O=YOURDOMAIN/OU=SRI/cn=Configuration/cn=Servers/cn=NEWSERVER"
WScript.Echo "Changed!"
LVL 11

Accepted Solution

pratap_r earned 500 total points
ID: 12258303
hey and you might want to try this too;en-us;324127


Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scores100 challenge 3 84
countHi challenge 25 85
how to send memory stream from ics Client To ics server ? 11 50
Java Loop 4 22
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about a problem I had getting the GPS LocationListener working.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now