Friday, March 21, 2014

Removing the “Set expansion server” setting for a Exchange Server 2010 distribution group that is still referencing an Exchange 2003 Server


You’ve just completed migration an Exchange Server 2003 organization to Exchange 2010 but noticed that emails to some distribution groups are not being delivered.  After reviewing the distribution groups, you notice that the Set expansion server setting for the distribution group is still referencing the Exchange 2003 Server:

image image

The easy fix is to simply uncheck the Set expansion server, click OK and you’re on your way. 


The challenge by doing it this way is if there are either a lot of distribution groups set this way or there are so many distribution groups that it would take too much time to determine which ones have this set.


The way to automate the process as many would know is to use the PowerShell cmdlets.  To determine which distribution groups have this set, we can use the Get-DistributionGroup cmdlet as described in the following TechNet article:

The attribute we’re interested in is the ExpansionServer attribute as shown here:

Get-DistributionGroup -identity “S2 Students” | FL


We can alternatively use the following cmdlet to list all of the groups by their DisplayName and ExpansionServer attribute only but the problem by doing it this way is that it would list groups with no ExpansionServer set as well:

Get-DistributionGroup | FL DisplayName,ExpansionServer


To refine the search, we can use the -filter switch as such:

Get-DistributionGroup -Filter {ExpansionServer -like '/o=EDUCATION*'} | FL DisplayName,ExpansionServer


Other methods that would achive the same results is to use -eq switch for a exact search or the -ne (not equal) switch as such:

Get-DistributionGroup -Filter {ExpansionServer -ne $null} | FL DisplayName,ExpansionServer


With the cmdlets used to retrieve the distribution groups with an expansion server set, we can now use the Set-DistributionGroup cmdlet as described here:

… to remove the ExpansionServer attribute.  To do this for a single distribution group, use the following cmdlet:

Set-DistributionGroup -Identity "BUT" -ExpansionServer $null


To do the same for all of the distribution groups, use the following cmdlet:

Get-DistributionGroup -Filter {ExpansionServer -like '/o=EDUCATION*'} | Set-DistributionGroup -ExpansionServer $null

This cmdlet will ask you to confirm for each which is useful if you want to be sure you don’t inadvertently set other distribution groups to null but if you’re sure that all of the returned distribution groups should have their ExpansionServer attribute removed, you can simply use the letter A response to set all of the groups in one shot.

Once the above cmdlet successfully executes, the distribution group’s Advanced tab should display the Set expansion server setting as such:



Anonymous said...

Excellent article. The filter commands helped me identify 6 DLs that needed the expansion server changed. Saved me from having to manually go through several hundred Dls.

David Chaumont said...

On my Exchange 2013, it took about 45 seconds per distribution group to update.

FYI, I was cancelling the command because i thought it was doing nothing but it was working.

I did not get a prompt for each group. It did all automatically.

Anonymous said...