?
Solved

Modify Expansion Server for large amount of Distribution Lists

Posted on 2004-09-01
11
Medium Priority
?
1,698 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 22

Accepted Solution

by:
kristinaw earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
New style of hardware planning for Microsoft Exchange server.
To show how to generate a certificate request 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 Servers >> Certificates…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Suggested Courses

765 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