Convert Mailbox to Mailuser

Convert Mailbox to Mailuser

I was asked to convert a mailbox to a mailuser, and funny enough although the reverse is true, you can’t just call enable-mailuser on a mailbox…

Of course you can disable-mailbox and then enable-mailuser but that removes all Exchange related attributes, which isn’t really that desirable.  To overcome this I wrote a small script that will do the conversion for you and keep the pertinent attributes.

The script takes the following parameters

  • Identity: which mailbox are you looking to convert
  • ExternalEmailAddress: where do you want mail for this mailuser to go
  • DomainController: optional, but forces all operations to be done on the same DomainController

If you want to preserve other attributes it is trivial to update the script to do so. After the following line just add whichever other attributes you want to retain

$parameters.add( 'CustomAttribute15', $OldMailbox.CustomAttribute15 )


So just a quick post today, but hopefully a useful one

*** As always the script is provided on an as is basis, please test it before you use it in a production environment. ***