After converting a Regular Mailbox or a Shared mailbox in Exchange Online.
The AD object isn’t updated back to on premise (Exchange 2010).
To convert AD object to correct mailbox type:
1 |
Import-Module ActiveDirectory |
1 2 3 4 5 |
# Convert to Remote Shared Mailbox $SamAccountname = 'Username' Disable-AdAccount $SamAccountname Set-AdUser $SamAccountname -Replace @{msExchRemoteRecipientType="100"} Set-AdUser $SamAccountname -Replace @{msExchRecipientTypeDetails="34359738368"} |
1 2 3 4 5 |
# Convert to Remote Regular Mailbox $SamAccountname = 'Username' Enable-AdAccount $SamAccountname Set-AdUser $SamAccountname -Replace @{msExchRemoteRecipientType="4"} Set-AdUser $SamAccountname -Replace @{msExchRecipientTypeDetails="2147483648"} |
Disclaimer: All scripts and references on this blog are offered “as is” with no warranty. These scripts are tested in my environment, it is recommended that it is tested in a test environment before using in production.