Here's but two possible ways that sprung to mind.
 
Returns security groups only -
 
dsquery * domainroot -filter "(&(objectcategory=group)(!sAMAccountType:1.2.840.113556.1.4.803:=1))"
 
Return DLs only -
 
dsquery * domainroot -filter "(&(objectcategory=group)(sAMAccountType:1.2.840.113556.1.4.803:=1))"
 
Deano

--
Dean Wells
MSEtechnology
* Email: dwells@msetechnology.com
http://msetechnology.com

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Johnson
Sent: Wednesday, November 03, 2004 3:55 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Scripting help

Hi to all from Darkest Africa!!

 

Can anyone assist me with a scripting issue?

 

 I’ve generated a list of the groups in my AD by using dsquery. I have a text file as output. I’ve been able read this into a file and extract some information. However my management wants a list of all the Distribution lists only with the Name of the Group and who it’s Manager is.

 

My script generates all the requisite info but I can’t get it to differentiate between Security and DL’s. We have a bunch of Security Groups that have had Exchange E-mail addresses added to them and so are being used as DL’s as well. It appears that all the DL’s have a proxyAddresses attribute.

 

Is there anyway I can do a script based search through the whole if the domain and extract all groups that have this attribute and return the values that I need.

 

Any help would really appreciated as I’m completely new to this.

 

Regards

Peter Johnson

Reply via email to