-->

Tuesday, April 5, 2016

Exchange Bulk Adding X500 Addresses For Distribution Groups

A while back I wrote a post on Bulk Adding X500 Legacy Addresses to User Mailboxes, and thought I should show how to create X500's for Distribution Groups...for those of you like me who have to Exchange cut-overs rather than migrations :)

Gathering the X500 Information:

**Note** The following process will require you to have rights/access on the Source Domain - the one you're moving users From.

On the Source domain, fire up an elevated Active Directory for Windows PowerShell, and run the following command:


Get-ADgroup -SearchBase “OU=Distribution Lists,DC=domain,DC=com” -Filter * -Properties Dis
playName,legacyExchangeDN | Select-Object DisplayName,legacyExchangeDN | Export-CSV C:\Temp\Distrosx500.csv -NoTypeInformation


**Note** Change “OU=Distribution Lists,DC=domain,DC=com” to the Distinguished Name of the OU in the domain you're moving from. You can alos name the CSV whatever you like.

Creating the CSV with X500 Info:
Label the Column A heading: Name, and Column B: X500

In Column A, you should have your list of distro Display Names

In Column B, you should have all of the corresponding X500 Legacy Addresses

Save the newly formatted CSV with a name like DistrosX500.csv

Copy the .CSV to an Exchange Server in the Target Domain.

On the Exchange Server in the Target Domain, fire up the Exchange Management Shell and run the following cmdlet:

$CSV = Import-CSV "C:\Temp\Distrosx500.csv"

$CSV | foreach {Set-DistributionGroup -identity $_.Name -EmailAddresses @{Add = "X500:$($_.X500)"}}


Ignore or fix errors - some names will not match so those will have to be manually corrected.

No comments:

Post a Comment