Solved

Modify Expansion Server for large amount of Distribution Lists

Posted on 2004-09-01
11
1,674 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
  • 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
how to add IIS SMTP to handle application/Scanner relays into office 365.
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…

789 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