Welcome back to my three-part blog series on Removing Your Last Exchange Server. To recap part one of this series, we reviewed what commands were available on your new management server after retiring your last Exchange server in your synced environment. We also covered how a new security group called “Recipient Management EMT” was created when you finished running through the steps of creating an Exchange hybrid management only server.
In part two, we are going to cover the basics of Remote Recipient Commands.
The “Get” Command
“Get” in PowerShell will output the results of a PowerShell cmdlet, such as Get-MailUser. Used by itself it will not modify attributes. For example, “Get-MailUser -Identity “Mickey Mantle” will return the results of the mail user, Mickey Mantle.
The “Set” Command
“Set” in PowerShell will modify the existing attributes of the specified cmdlet. For example, if you run “Set-DistributionGroup -Identity “HumanResources” -DisplayName “Human Resources””, you will have modified the display name of the distribution Group “HumanResources.”
The “New” Command
“New” commands will create new objects. For example, running “New-MailContact -Name “Aaron Judge” -ExternalEmailAddress “AaronJudge@Yankees.com”, will create a new mail contact called Aaron Judge with his external email address set to AaronJudge@Yankees.com.
The “Remove” Command
Remove command will delete items. If you were to run “Remove-DistributionGroup -Identity “HumanResources”, you will have deleted the distribution group named HumanResources.
The “Disable” Command
The “disable” command will disable the object of the specified property. Such as, Disable-RemoteMailbox -Identity “MikeTrout@Angels.com”. In this case, it will disable the remote mailbox attributes (causing the mailbox to be removed in Exchange Online upon a successful directory sync) but will maintain the on-premises AD user account for the user.
The “Enable” Command
The “enable” command will enable the specified action against a pre-existing AD object. For example, running “Enable-MailUser -Identity “Justin Turner -ExternalEmailAddress JustinTurner@alex-lugoodgers.com” will enable Justin Turner’s on-premises AD user account with an external email address but will not create a remote mailbox.
Other Commands
The “set”, “get”, “new”, “remove”, and “disable” actions are common among most of the managed recipient commands. DistributionGroupMember has two primary commands “add” and “update”.
Add-DistributionGroupMember will add a user to the specified distribution group and Update-DistributionGroupmember will update all members of the specified distribution group to the users you’ve identified in the script.
As well as the actions for DistributionGroupMember, you’ll note the EmailAddressPolicy has an “update” action. Update-EmailAddressPolicy is used for pushing out changes applied to the email address policy to all recipients assigned to the policy.
Conclusion
This completes our summary of the actions and commands available for managing your recipients.
Join us for the final part of Removing Your Last Exchange Server: Part 3- Reviewing Common Commands.
For more information, questions or feedback, as always, please get in touch with us!