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!

Listing Distribution Groups Only?

Status
Not open for further replies.

KeithPA

IS-IT--Management
Nov 4, 2009
1
GB
thread329-1187617

I came across the fantastic script in the thread above, but I would like to tailor this so that it lists distribution groups only. I don't have the technical know-how to achieve this task, could somebody suggest/assist?

Regards,
Keith
 
Check out this mskb showing (quite gently I would say) you how to do a query.
And at the place of the filter used in the demonstration in it:
[tt] (&(objectCategory=person)(objectClass=User)(userAccountControl:1.2.840.113556.1.4.803:=2))[/tt]
replace it instead with the filter to exclude (!) all groups with security enabled flag (&H80000000) set to on.
[tt] (&(objectCategory=group)(!groupType:1.2.840.113556.1.4.803:=2147483648))[/tt]
And that's all you need. The other data and needs are privy to you, only yourself know such as the domain name and what you need to return as properties etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top