PowerShell - Export Mailbox Users to CSV

16. October 2011 13:03

This script exports users from an OU to a CSV that can be used by other scripts.  I had to move hundreds of users from one domain to another and modify some user properties during the process.  A CSV file allows you to open the file in Excel and edit the fields as needed.  You can take the output of this script and use it to create uses in a new domain with this script.

Get-Mailbox -OrganizationalUnit "User OU" | Export-Csv -f User_Mailboxes.csv

Export details for all mailboxes for user in OU.txt (76.00 bytes)

About Jim Bouse

I grew up with computers being a part of my life.  I set up my first 'network' by 15 (in 1997) and have been exploring innovative ways to make the lives easier for everyday people using tools readibly available.

 

I now work for Texas A&M University as a Senior Systems Administrator designing and maintaining a GIS system that is used by thousands of users daily.