script to find all mail enabled security groups

Hello,

I would like to tidy up AD by renaming all mail enabled security groups. We have many of them in AD. So my question is:
Is there a script that would query AD so that all mail enabled security groups show up in the results?

Hope I am making sense,
Tacobell2000
Tacobell2000Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Tacobell2000Connect With a Mentor Author Commented:
Got the answer:

DSQuery * ForestRoot -Filter "(&(samAccountType=268435456)(mail=*))" -Limit 0 > c:\results.txt
0
All Courses

From novice to tech pro — start learning today.