Skip to main content

Posts

Showing posts from December, 2009

Using ADSI to find your CAS or Mailbox Role servers in VBS or PowerShell

While the Exchange Management Shell is a thing of wonder its not always available when your writing a script or piece of real code and you need to do something like finding your Exchange 2007/2010 CAS or Mailbox role servers. The good news is like most of the Exchange configuration information this is stored in Active directory and can be relatively easily queried using LDAP and ADSI. The AD property that holds this information about what particular roles are installed on a Exchange server is the msExchCurrentServerRoles property. This property contain a number of bitwise flags that indicate which roles are installed as per http://technet.microsoft.com/en-us/library/bb123496(EXCHG.80).aspx . Server role Role value Mailbox role 2 Client Access role (CAS) 4 Unified Messaging role 16 Hub Transport role 32 Edge Transport role 64 So to query these in ADSI we need to use a Bitwise filter as per http://support.micros

Changing OWA configuration setting with EWS in Exchange 2010

The ability to change and customise the default configuration of OWA is an often sort out and in previous versions of Exchange hard to achieve task. Especially for those with Large Exchange Orgs and standardised training or custom security requirements where the default settings come into conflict with other policies. Underlying a lot of OWA configuration settings are stored in FAI items (folder associated items) in a users mailbox using the Configuration Information Protocol Specification documented in http://msdn.microsoft.com/en-us/library/cc463899(EXCHG.80).aspx . Along with the ability to access FAI items which was previously not possible in Exchange 2007 using EWS, Exchange 2010 also introduces a new UserConfiguration Operation in EWS that provides some Typed objects the makes dealing with configuration objects a lot easier and safer for those that wish to do so. ( I still wouldn't guarantee the support response you would get if you do use these Operations and stuff your Exch

Using Contact photo's in EWS in Exchange 2010

Contact photo's where a feature first introduced in Outlook 2003 but up until the release on Exchange 2010 not something you could use in EWS. This should not be confused with another new feature in Exchange 2010 which is the ability to upload a picture to the Gal (or the directory to be more precise) if your interested in finding out more about that check out Ilse post . So the Contact photo's I'm talking about are those that are associated with contact Items in your mailbox. About 4 years ago i posted this script (which was rubbish) for doing this with CDO 1.2 importantly in the heady stile of 2005 i pointed out that when using contact photos you need to set some extended properties on the attachment. Now while you still can't do this with EWS :( in 2010 they have added the ability to set the properties of a contact photo(just wish they hadn't stopped there). Further the EWS Managed API actually makes the process of adding a contact photo quite easy. So a very s
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.