none
E2007 Storage and Server State RRS feed

  • Question

  • I'm not really familiar with how exchange stores its user-related data. I know that Active Directory ends up holding a lot of it (or maybe all of it?). Essentially what I've been tasked with is building a user automation system that creates user and email accounts as employees are onboarded in our HR system. I'm familiar with Active Directory automation, so I'm wondering if I can achieve all that is needed to create/update/disable exchange user accounts directly through AD properties or whether I need to rely on some other mechanism, like powershell. Are the exchange attributes in AD all that exchange uses to determine user state, or does it have its own internal storage mechanisms where other user-level configuration is stored?

     

    What I've noticed is there's no API that allows me to interact directly with exchange objects which seems kind of odd, maybe I'm wrong? I've found reference to powershell scripts, and some older CDOEXM api that no longer works in exchange 2007. Powershell is not really ideal. Having to create runtimes just to call scripts that are essentially calling other code that I could just call directly is not very efficient. What's the best approach to exchange user automation?

    Saturday, May 14, 2011 5:22 PM

Answers

  • The best and only supported method of doing things like creating mailboxes and mail enabling objects is to use the Exchange Management Shell which you can automate using .NET using the methods outlined in http://msdn.microsoft.com/en-us/library/bb332449%28v=exchg.80%29.aspx.  The Exchange Management Console is the best example of this as it uses the underlying EMS cmdlets to perform all the underlying exchange administrative task done via the EMC so done correctly this is an efficient method. Active Directory properties you can manipulate directly using something like System.DirectoryServices but you have to do all the hard work of identifying all the particular properties you want to modify and write you validation routines to ensure your not writing bad data into these properties. But it really depends on the project you may find yourself using a combination of both depending on the task at hand.

    Cheers
    Glen

     

    • Marked as answer by Chad Hynes Monday, May 16, 2011 2:06 PM
    Monday, May 16, 2011 11:19 AM

All replies

  • The best and only supported method of doing things like creating mailboxes and mail enabling objects is to use the Exchange Management Shell which you can automate using .NET using the methods outlined in http://msdn.microsoft.com/en-us/library/bb332449%28v=exchg.80%29.aspx.  The Exchange Management Console is the best example of this as it uses the underlying EMS cmdlets to perform all the underlying exchange administrative task done via the EMC so done correctly this is an efficient method. Active Directory properties you can manipulate directly using something like System.DirectoryServices but you have to do all the hard work of identifying all the particular properties you want to modify and write you validation routines to ensure your not writing bad data into these properties. But it really depends on the project you may find yourself using a combination of both depending on the task at hand.

    Cheers
    Glen

     

    • Marked as answer by Chad Hynes Monday, May 16, 2011 2:06 PM
    Monday, May 16, 2011 11:19 AM
  • Thanks Glen, so I take it Exchange doesn't have a second storage location for user data then? If I were to do the "hard work" and update AD properties directly, it would work the same as if I used the commandlets?
    Monday, May 16, 2011 2:05 PM
  • Exchange uses Active Directory as its directory service so things like First, Last name, phone address etc sure when it comes to mail enabling objects, creating new mailboxes and changing the rights on mailbox objects you need to use the cmdlets. There are thing like mailbox rights and mail enabling objects that you can't do any other way so in the long run if your application is going to be doing complex things in Exchange its better to use the cmdlets. It will also save you a considerable amount of development time.

    Cheers

    Glen

    Tuesday, May 17, 2011 12:41 PM