Solved

Modify Expansion Server for large amount of Distribution Lists

Posted on 2004-09-01
11
1,691 Views
Last Modified: 2012-06-27

I need to modify the expansion server attribute on 900 distribution lists ... I've been trying to get the syntax correct and use LDIFDE but it doesn't seem to work ..

The import shows successful on my test but when I check the attribute on the DL it shows blank, instead of showing the old server name or "Expand on any server in the org" ...

The syntax I'm using is as follows:

dn: CN=ExpansionTest,OU=Users,OU=Accounts,DC=corp,DC=contoso,DC=com
changetype: modify
replace: msExchExpansionServerName
msExchExpansionServerName: CN=<ServerName>,OU=Applications,OU=Resources,DC=corp,DC=contoso,DC=com
-



CN=<ServerName>,OU=Applications,OU=Resources,DC=corp,DC=contoso,DC=com = the Distinguished Name of the new expansion server ... I've verified, even cut and pasted the direct DN's from ADSI ... no spaces ...

Anyone familiar enough with LDIFDE to understand what I'm doing wrong ... or know of a better way to mass change the expansion servers for a list of DL's?
0
Comment
Question by:BNettles73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 22

Expert Comment

by:kristinaw
ID: 11956697
it would be really easy to write a little vbscript to do it.

are all the DL's in the same OU, by any chance, or do they all have the same 'old' server in that attribute?

kris.
0
 
LVL 12

Author Comment

by:BNettles73
ID: 11956920
Unfortunately the DL's are not all in the same OU, but I'm not opposed to moving them if it means an easier way to modify the expansion server attribute. The servers have three different possibilities for expansion servers, not excluding some which were configured improperly to expand on any server in the org ...

It's been years since I wrote any VBScript ... if you have any code I'd definitely give it a shot ...
0
 
LVL 22

Expert Comment

by:kristinaw
ID: 11956964
it would be easiest if they were all in the same OU, especially since I don't know you're environment.

i can write something generic based on a top level ou. easy enough to add a few extra "ou=" lines if it's not a top level OU.

give me a few minutes...

kris.
0
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 
LVL 22

Accepted Solution

by:
kristinaw earned 500 total points
ID: 11957207
Set objOU                   = GetObject("LDAP://ou=Groups,dc=domain,dc=com")

For Each objGroup In objOU
      If objGroup.Class = "group" then      ' Filter the Domain Object/Collection to modify groups only
            objGroup.msExchExpansionServerName = "/O=ORGANIZATION/OU=SITE/cn=Configuration/cn=Servers/cn=MAIL"
            'objGroup.SetInfo
            'wscript.Echo objGroup.msExchExpansionServerName
      End If
Next

set objOU                   = Nothing
wscript.Echo "All Done"


here ya go. remove the ' at the beginning of the wscript.Echo line and all it will do is Echo the attribute that's already there. As long as the ' is in front of the setinfo line, it won't make any changes. remove it and the changes will become permanent when you run the script.

you could make a test OU, put one DL in there that already has the proper expansion server name, run the script and record what it echoes, change the commented line to match your values (and the set objou line to match the OU and your domain), then run a few tests.

should work like a charm. let me know if it you have any probs with it and i'll help you work them out.

cheers,
kris.
0
 
LVL 12

Author Comment

by:BNettles73
ID: 11957230
Lets assume they are all in the same OU ...

CN=DistributionList,OU=Users,OU=Accounts,DC=corp,DC=contoso,DC=com

and I need to set the expansion server to

CN=<ServerName>,OU=Applications,OU=Resources,DC=corp,DC=contoso,DC=com


how difficult would it be to have the script pull from another text file which only contained the DL names or at least the distinguished name of the DL? I appreciate any help you give me with this!!

Thanks!
0
 
LVL 12

Author Comment

by:BNettles73
ID: 11957237
doh! You just posted :) Thanks ... I'll give it a shot ..
0
 
LVL 22

Expert Comment

by:kristinaw
ID: 11957262
also, looks like the expansion server name is in the format i listed. maybe that's why it's erroring out on you with LDIFDE?
0
 
LVL 12

Author Comment

by:BNettles73
ID: 11957370


In my test environment I have the following .. am I missing something?  It runs without error but still hasn't changed the attribute ...




Set objOU                = GetObject("LDAP://ou=Distribution Lists,ou=Accounts,dc=corp,dc=tccirg,dc=com")

For Each objGroup In objOU
     If objGroup.Class = "group" then     ' Filter the Domain Object/Collection to modify groups only
          objGroup.msExchExpansionServerName = "/O=Trammell Crow/OU=TC/cn=Configuration/cn=Servers/cn=MDK01UMB01"
          'objGroup.SetInfo
          'wscript.Echo objGroup.msExchExpansionServerName
     End If
Next

set objOU                = Nothing
wscript.Echo "All Done"
0
 
LVL 22

Expert Comment

by:kristinaw
ID: 11957418
as long as the objGroup.SetInfo has the ' in front of it, it won't change the attribute. you have to take the apostrophe away for it to actually change it.

Kris.
0
 
LVL 12

Author Comment

by:BNettles73
ID: 11957507
hehe ummm sorry .... I wasn't paying attention! The script works like a charm!
0
 
LVL 22

Expert Comment

by:kristinaw
ID: 11957646
cool. gifts of appreciation are always welcome ;).
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

696 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