• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 901
  • Last Modified:

Powershell - Export email users by OU

Anyone have a script to export email accounts sorted by the OU they user is located in?
0
someITGuy
Asked:
someITGuy
1 Solution
 
KenMcFCommented:
You can use the quest ad cmdlets and sort by parent OU

Get-Qaduser -sizelimit 0 -ldapfilter "(mail=*)" | Select Name, email, ParentContainer, ParentContainerDN | Sort ParentContainer | Export-csv c:\users.csv

http://www.quest.com/powershell/activeroles-server.aspx
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now