BNettles73
asked on
Modify Expansion Server for large amount of Distribution Lists
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,
changetype: modify
replace: msExchExpansionServerName
msExchExpansionServerName:
-
CN=<ServerName>,OU=Applica
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?
ASKER
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 ...
It's been years since I wrote any VBScript ... if you have any code I'd definitely give it a shot ...
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Lets assume they are all in the same OU ...
CN=DistributionList,OU=Use rs,OU=Acco unts,DC=co rp,DC=cont oso,DC=com
and I need to set the expansion server to
CN=<ServerName>,OU=Applica tions,OU=R esources,D C=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!
CN=DistributionList,OU=Use
and I need to set the expansion server to
CN=<ServerName>,OU=Applica
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!
ASKER
doh! You just posted :) Thanks ... I'll give it a shot ..
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?
ASKER
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=Distr
For Each objGroup In objOU
If objGroup.Class = "group" then ' Filter the Domain Object/Collection to modify groups only
objGroup.msExchExpansionSe
'objGroup.SetInfo
'wscript.Echo objGroup.msExchExpansionSe
End If
Next
set objOU = Nothing
wscript.Echo "All Done"
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.
Kris.
ASKER
hehe ummm sorry .... I wasn't paying attention! The script works like a charm!
cool. gifts of appreciation are always welcome ;).
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.