Creating Exchange 2007 mailboxes through AD attributes

If you are using a third-party/home-grown application or script to provision user accounts and mailboxes, you can still create mailboxes by populating Active Directory attributes. The recommended way would be to use PowerShell aka Exchange Management Shell or the Exchange Management Console. However, this may not always be possible – so here’s something that I’ve tried and it works.

Please pay special attention to the disclaimer at the bottom of the page. This (and any other post) is my own view and not endorsed by Microsoft. Supportability of this method is at Microsoft’s discretion. You are on your own when it comes to risk. :)

The following attributes need to be populated, just like earlier versions of Exchange Server:

  • HomeMTA
  • HomeMDB
  • legacyExchangeDN
  • msExchHomeServerName

In addition, the following "mandatory attributes" need to be added. To know the values for these attributes in your environment, see the values on existing mailboxes using ADSIEDIT.

  • msExchVersion
  • msExchMobileMailboxFlags
  • msExchRecipientDisplayType
  • msExchRecipientTypeDetails

If you prefer not to add the "mandatory attributes", you can always run the following Shell command, and Exchange will do that stuff for you.

Set-Mailbox <mailboxname> -applymandatoryproperties

Shijaz Abdulla is a Partner Technology Advisor at Microsoft, helping their top tier partners build on their Microsoft practice. He is also a trusted advisor to medium enterprise customers in Qatar. He is a blogger, tech enthusiast, and a Microsoft evangelist.

Trackback Permanent Link

9 comments on "Creating Exchange 2007 mailboxes through AD attributes"

  1. Anonymous says:

    This isn’t working!
    What about the exchange Guid attribute?
    How do you generate this?

  2. Shijaz says:

    Works well for me. Make sure the values are alright.

    The GUID need not be set. It will be taken care of by Exchange.

  3. muhammed says:

    Dear, Where should i create the suggested attributes,I mean the path under ADSIEDIT. Thanks/

  4. Yash Vartak says:

    Hey Shijaz, thanks this works for me thanks for this post , just one more thing , when does the GUID gets Set ? At the first logon ? Coz I cant see this particular account in the address book as long as GUID is not set!

    Yash

    yashvartak[at]gmail[dot]com

  5. Anonymous says:

    Same question from me…When and how is the GUID set. Additionally, Microsoft support mentioned that there are certain background tasks that are done in the background when creating mailboxes, therefore this approach is not supported. What has been your experience? It is frustrating having to use powershell only! I agree.

  6. Shijaz says:

    The recommended approach is always to use Powershell. This is an unsupported method that I used in a situation where I could not use PowerShell. PowerShell is not frustrating, it makes things MUCH easier!

  7. Kamar says:

    I came across your article when I was trying to figure out why mailboxes are not getting created when we migrated to Exchange 2007 and switched off 2003 server. We were only setting the first 4 attributes. I will try by setting the mandatory attributes. Hope it will work.

  8. Hi Kamar,

    Good to see you here. Yes the mandatory attributes are required. The easiest way would be to use Exchange PowerShell remotely if your application can support it (maybe in a newer build).

  9. Pingback: Creating Exchange 2007 mailboxes through AD attributes | microsoftNOW « JC’s Blog-O-Gibberish

Leave an opinion!