Skip to main content

Posts

Showing posts from 2014

Dumping out the MailTips for all the recipients using EWS and Powershell

MailTip's are a feature in Exchange from 2010 that gives you extra information when sending a message. In a pervious post I showed how you can use these to get the Outlook of Office status for a user using MailTips in EWS. In this Post I have a sample for going through and dumping out all the MailTips for all the Recipients in Exchange (that are feed in using Get-Recipient to include Contacts, Distribution list and any other type of recipeint) and produces an output like      Because there are no classes in the EWS Managed API to use MailTips so I'm just using Raw SOAP to send the MailTips request and then parse the XML result that comes back. With MailTips you can only request a max of 100 results at a time so there is some code to split the request up in batches of 100 if there are more the 100 entries. I've put a download of this script here the script looks like ## Get the Mailbox to Access from the 1st commandline argument $MailboxName = $args [0]

Advanced Search Folder creation with EWS and Powershell

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 Microsoft.Exchange.WebServices.Data.Extende

Creating a new folder in EWS and add it to the MyContacts list in OWA in Exchange 2013/Office365

The peoples hub is one of the new features in Exchange 2013 and Exchange Online that is aimed at making your life richer. One little quirk if your creating new folders using EWS is that they won't appear in the My Contacts list inOWA eg if I was creating a folder named aNewContactsFolder you would get To make the new Folder you just created appear in the MyContacts list rather then other contacts you need to set these two yet to be documented properties PeopleHubSortGroupPriority  PeopleHubSortGroupPriorityVersion Setting the value of these two named properties to 5 and 2 respectively will make the folder appear under My Contacts, if you want to move the folder into other contacts set the values to 10 and 2 Here's a sample script to create a New Folder as a subfolder of a Mailboxes Contacts Folder and set these two properties so the Contact Folder appears under MyContacts To run the script pass the emailaddress of the mailbox you want to run it against as the

A look into Conversations with EWS and Powershell in a Mailbox

Conversation views in email clients have become par for the course these days, while I'm personally not a great fan it can be a useful feature to use when looking at Mailbox data. With EWS from Exchange 2010 you can use the dedicated EWS operations which are documented http://msdn.microsoft.com/en-us/library/office/dn610351(v=exchg.150).aspx  . In Exchange 2013 the conversation operations have been enhanced to offer more functionality such as the ability to use an AQS QueryString to filter the results plus also the ability to apply actions to conversation like applying categories or a specific retention tag. One interesting thing you can apply these conversation operations to is looking at Mailbox statistics in a different way by looking at the operation of Mailboxes to see how engaged the owners or users of the Mailboxes are, by seeing how engaged in the conversation that are happening in the Mailbox. eg The FindConversation operation in Exchange will return information suc

Searching based on Categories in EWS

The Categories or Keywords properties on a Mailbox Item is one of the more commonly used Item properties in Exchange. When you want to search for Items with a particular Category set it does present some challenges in EWS. With EWS you have 3 different search methods, the first being Restrictions (or SearchFilter's if your using the Managed API) that work like MAPI restrictions although you can't build restriction that are 100% equivalent to what you can in MAPI. One particular case is with the Categories property, because this is a Multi-Valued property (or String Array) the IsEqual and Contains Restrictions wont work like the Sproperty restriction in MAPI  http://msdn.microsoft.com/en-us/library/office/cc815385(v=office.15).aspx So the next type of Search you can do is a Search of a Mailbox folder using an AQS querystring which essentially does an Index search. Because the Categories property is an Indexed property this will work fine for Categories. The thrid type of Sea

Sending a No Reply, No ReplyAll, No Forward Email using EWS and Powershell

I've you haven't seen this before Gavin Smyth from Microsoft Research put together this cool VSTO plugin to allow you to send an Email from Outlook that will disable the Reply, ReplyAll and Forward Buttons on the Outlook ribbon  http://research.microsoft.com/en-us/projects/researchdesktop/noreplyall.aspx and the how to posts about the VSTO  http://blogs.msdn.com/b/gsmyth/archive/2011/09/18/noreply-vsto-add-in-wrap-up.aspx  . Note this only works in Outlook (not OWA or ActiveSync etc) but basically what a users would see when they receive a message is How this works is it sets the PidLidVerbStream Property on a message which is mostly documented in the http://msdn.microsoft.com/en-us/library/ee218541(v=exchg.80).aspx  protocol document. I say mostly because the format you get when using the methods from the NoReply Addin is a little different from the format documented which is for Voting buttons but its good enough to work with. The Verbs that this property refers to a
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.