In the past I've posted some examples of creating SearchFolders in Exchange with EWS and Powershell in the following post , in this post I want to cover some more advanced things you can do with EWS and Search Folders. The first thing I want to cover is how you change the option on a Search folder from "Show number of unread items" which is the default when you create a search folder in EWS to "Show total number of items". eg To change this option you need to set the PidTagExtendedFolderFlags property which is documented in http://msdn.microsoft.com/en-us/library/office/cc839880(v=office.15).aspx . This is a binary property and you set this particular option by changing bit 6-7 in this property. Because you also need the SearchFolderGuid in this property the easiest time is to set this is right after you create the folder. eg $searchFolder .Save( $sfRoot .Id); $PR_EXTENDED_FOLDER_FLAGS = new-object Mic...
Pushing the Envelope in Messaging and Office 365 Development