No, had I read your question more thoroughly I'd have known that was useful to you ;)  It currently differentiates the group types by querying on the bit used by AD to maintain the difference.  Proxy address doesn't come into play.
 
Maybe this will do as you ask -
 
dsquery * domainroot -filter "(&(objectcategory=group)(proxyAddresses=*))"
 
Does that solve your problem?

--
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 9:13 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Scripting help

Thanks Dean. Would that return the Security groups that are also being used as DL by virtue of having the proxy address field set?

 

Sorry if it’s an obvious question but I new to this side of AD

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean Wells
Sent: 03 November 2004 16:11
To: Send - AD mailing list
Subject: RE: [ActiveDir] Scripting help

 

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: [EMAIL PROTECTED]
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