Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify Distribution Lists

Status
Not open for further replies.
Aug 15, 2006
14
US
I have a number of DL's that I need to update the managed by field. All the DL's are located in the same OU. The script I am using is the following

Set objGroup = GetObject _
("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")

objGroup.Put "managedBy", "cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com"
objGroup.SetInfo


First the script is generating a "dn syntax" error on the objGrop.Setfo line In addition is it possible to update all DL's that begin with DL-US-xxx all at once? I have about 50 DL's that begin with DL-US-xxx and to manually do them one at a time will be very time consuming. Appreciate your response.

Thanks

 
What you posted looks like an example from MS...are you sure you're specifying the correct distinguished names for the DL and the user managing it?

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
yes, rather than put my company's info, i put MS's example.
Ya never know who is lurking on these forums i dont need to get crap for posting our Domain info.
 
How about make sure the dn is in the same domain and it corresponds to a user object actually existing? (When setting the managedBy in object A to object B's dn, ad will have some internal work to update some setting of object B - the manager - to assure internal consistency. This might fail for those reasons?)
 
I would suggest you post your real code and JUST change the domain name info to something generic so we can see if there are any syntax errors in what you are really using.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top