Solved

Script to change exchange settings in outlook

Posted on 2004-10-07
5
214 Views
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 !!
0
Comment
Question by:jjeffords
  • 4
5 Comments
 
LVL 11

Expert Comment

by:pratap_r
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?
0
 

Author Comment

by:jjeffords
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
0
 
LVL 11

Expert Comment

by:pratap_r
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://server.com/CN=John_doe,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..
0
 
LVL 11

Expert Comment

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

heres the updated listing

Set ad= GetObject("LDAP://server.com/CN=John_doe,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"
ad.setInfo
WScript.Echo "Changed!"
0
 
LVL 11

Accepted Solution

by:
pratap_r earned 500 total points
ID: 12258303
hey and you might want to try this too

http://support.microsoft.com/default.aspx?scid=kb;en-us;324127

Enjoy!
Pratap
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
autoit - check if option is checked in another program 2 134
MacOS and programming in React 7 35
simplest php form 3 79
How to Convert a Quote to an Order in SalesForce 2 43
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 …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

803 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