If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.
Get-ClientAccessServer | Set-ClientAccessServer -AutoDiscoverServiceInternalUri $Null
If you are not using on-prem anymore you can delete the arbitration mailbox by this command and uninstall Exchange from Add/Remove programs. Stop the Exchange services for couple of days to be safe before uninstall.get-mailbox -arbitration | remove-mailbox
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
As a precaution before uninstalling I would turn off all exchange services and verify if you have any issues before hand.