-->

Saturday, August 23, 2014

Exchange 2010 Getting a List of Aliases from a List of Display Names

This is a quick post on using PowerShell to export a list of user aliases from a list of display names. While working on a project to clean up a bunch (read: a ton) of inactive mailboxes, I exported a CSV list of mailboxes that were part of a particular OU. This list was for management to go over, so it had to be clear who the actual users were. In order to export these mailboxes to PSTs later, I needed the aliases. So, here's how to quickly get a CSV list of aliases from the original display name list.

Create a CSV with the list of Display Names and with "Name" as the column heading and save it to your desired location, such as C:\displaynames.csv

Then, fire up the Exchange Management Shell, and run:

Import-CSV C:\ExchangeCommands\displaynames.csv | ForEach {Get-Mailbox -Identity "$($_.Name)"} | Select Alias | Export-CSV C:\ExchangeCommands\aliases.csv

Now, you'll have a nice CSV list of aliases that you can import into a command to do what you need, like: bulk PST exports.

No comments:

Post a Comment