So my fellow Insentra crewmate, Dan Snape, has inspired you to finally get rid of your last Exchange server with his “Updates to Microsoft Exchange 2019” blog article. What’s next?
With Exchange 2019 CU 12 as your current schema version, you can do so in a fully supported environment. Once you’ve completed the commands for removing your final Exchange server, you can walk through the below actions for managing your recipients since your source of authority (SOA) is still on-premises Active Directory.
Recipient Management EMT Security Group
IIf you’ve followed the steps outlined in Microsoft’s ‘Manage recipients in Exchange Hybrid environments using Management tools’ article, you’ll note a new active directory security group was created called the “Recipient Management EMT.” Members of this group will be able to manage recipients in your organization.
Recipient Management Commands
As a reminder, any changes made to the on-premises AD environment will be synced to Azure AD and M365 via your Azure AD Connect server.
- To manage your synchronised recipients and groups, connect to the new management server’s PowerShell and execute the following command:
Add-PSSnapin *RecipientManagement
This will import all the required commands for managing your recipients. Run this command every time you need to manage recipients.
I have broken down the available commands into the table below with a brief description for each:
MailUser Commands | Notes |
Set-MailUser | Used to set attributes onto a mail user |
Get-MailUser | Used to get the results of a mail user |
New-MailUser | Used to create a new mail user |
Remove-MailUser | Used to remove a mail user |
Disable-MailUser | Used to disable a mailbox for a mail user |
Enable-MailUser | Used to enable a new mail user |
MailContact Commands | Notes |
Set-MailContact | Used to set attributes onto a mail contact |
Get-MailContact | Used to get the results of a mail contact |
New-MailContact | Used to create a new mail contact |
Remove-MailContact | Used to remove a mail contact |
Disable-MailContact | Used to disable a mail contact |
Enable-MailContact | Used to enable a mail contact |
RemoteMailbox | Notes |
Set-RemoteMailbox | Used to set attributes onto a remote mailbox |
Get-RemoteMailbox | Used to get attributes of a remote mailbox |
New-RemoteMailbox | Used to create a new remote mailbox |
Remove-RemoteMailbox | Used to remove a remote mailbox |
Disable-RemoteMailbox | Used to disable a remote mailbox |
Enable-RemoteMailbox | Used to enable a remote mailbox |
DistributionGroup | Notes |
Set-DistributionGroup | Used to set attributes of a distribution group |
Get-DistributionGroup | Used to get the results of a distribution group |
New-DistributionGroup | Used to create a new distribution group |
Remove-DistributionGroup | Used to remove a distribution group |
Disable-DistributionGroup | Used to disable a distribution group |
Enable-DistributionGroup | Used to enable a distribution group |
DistributionGroupMember | Notes |
Get-DistributionGroupMember | Used to get the members of a distribution group |
Add-DistributionGroupMember | Used to add a member to a distribution group |
Remove-DistributionGroupMember | Used to remove a member from a distribution group |
Update-DistributionGroupMember | Used to update the distribution group membership |
EmailAddressPolicy | Notes |
Set-EmailAddressPolicy | Used to set an email address policy |
Get-EmailAddressPolicy | Used to get the results of an email address policy |
New-EmailAddressPolicy | Used to create a new email address policy |
Remove-EmailAddressPolicy | Used to remove an email address policy |
Update-EmailAddressPolicy | Used to update an email address policy |
User | Notes |
Set-User | Used to set the attributes of a user |
Get-User | Used to get the results of a user |
At first glance, this looks like a lot of commands and the list can look quite overwhelming (especially if you’re not comfortable with or don’t use PowerShell regularly). It may help if you look at this in a different way. Instead of seeing a long list of commands, break it down into seven categories (as demonstrated in the table above):
- Mail users
- Mail contacts
- Remote mailboxes
- Distribution groups
- Distribution group memberships
- Email address policies
- Users
This brings us to the end of part 1 of Managing Recipients when Removing Your Last Exchange Server.
In part 2, “Removing Your Last Exchange Server: Part 2 – Remote Recipient Commands” we will dive into the seven categories of recipient commands.
For any questions or feedback, as always, you are welcome to contact us (we’d love to hear from you!).