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?

Improve company productivity with a Business Account.Sign Up

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

DSQuery * ForestRoot -Filter "(&(samAccountType=268435456)(mail=*))" -Limit 0 > c:\results.txt
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.