views:

366

answers:

1

(This post is referencing Exchange 2010 but the capability of resource mailboxes was introduced in Exchange 2007)

Exchange allows you to create different types of mailboxes for conference rooms - resource mailboxes - and assign custom properties to them, e.g. "Whiteboard", "A/V". These properties appear to be boolean, e.g. a conference room either has a whiteboard or not. You can assign these to a mailbox in the Exchange 2010 Management console (or in the Shell).

I'm trying to figure out how to programmatically access these properties. It doesn't appear that the Exchange Web Services API was intended for this, as all underlying data ends up being stored in Active Directory.

For example, one of the properties unique to a conference room mailbox is Resource Capacity, and you can grab that from Active Directory as follows:

child.Properties["msExchResourceCapacity"]

Where "child" represents a DirectoryEntry object as you're iterating through the contents of an Active Directory ou.

After browsing the Active Directory Schema at http://msdn.microsoft.com/en-us/library/ms675085%28VS.85%29.aspx, nothing jumped at me.

Thanks

+1  A: 

Resource Custom Properties ("Whiteboard", "A/V" in your question) are stored in the Active Directory Configuration Partition in the multivalue msExchResourcePropertySchema-attribute of CN=Resource Schema,CN=Global Settings,CN=Exchange 2010,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=ex2010,DC=lab. (So you won't find that information if you connect to DC=ex2010,DC=lab - you need to connect to the Configuration Partition Namespace - CN=Configuration,DC=ex2010,DC=lab.)

You need to use the Set-ResourceConfig cmdlet to add selectable custom resource properties (for example: Set-ResourceConfig -DomainController dc01.ex2010.lab -ResourcePropertySchema ("Room/16Seats","Equipment/Projector","Room/8Seats","Equipment/Whiteboard")). Then you need to use the Set-MailBox cmdlet (ie Set-MailBox roomtest -ResourceCustom "8Seats") to set the Resource Custom Properties for that particular resource mailbox.

I would advise against setting these Exchange-specific attributes manually (ie through System.DirectoryServices) as it might lead to unpredicable results. The supported way is to use the cmdlets. So, I would recommend that you call the cmdlets from your .NET code. There's a tutorial on CodeProject to get you started.

Per Noalt