Skip to main content

Posts

Showing posts from November, 2011

Creating an Out of Office Board using Remote Powershell, Mailtips and the EWS Managed API

Following on from my previous post on using MailTips and one of my other popular posts the FreeBusy board the following script creates an Out of office board that shows in one page peoples out of office status and if the out of office message is turned on it displays the OOF message for that user.Here's a quick picture of what it produces So how does it work it takes advantage of MailTips within EWS to get the OOF status of a user and what the OOF message is if its set. If you have a large number of users it batches the MailTips request in batches of 100 to ensure the request is successful. To get the list of users to query it takes advantage of using Remote powershell and uses the Get-Mailbox cmdlet. The following script is setup to work with Office365 but will work OnPremise as well if change around the remote powershell URL. The following variables are those that need to be configured to run this script $UserName = "user@domain.com" $Password = "passw

Using MailTips in EWS to get the OOF (Out of Office) Status of users with C# and Powershell

MailTips is one of the really useful new features of Exchange 2010 that can be exceedingly useful to anybody using Exchange Web Services. It provides access to Information such as the OOF status of a user or users within one WebService call and without the need for Full Access or elevated rights you would normally need with a GetUserOofSettings operations or using the Remote powershell cmdlets such as Get-MailboxAutoReplyConfiguration. The other thing MailTips are useful for apart from the other standard Mail-tips listed http://msdn.microsoft.com/en-us/library/dd877060%28v=exchg.140%29.aspx (things like the Max message size is useful for anybody sending email via EWS etc)  is the ability to create Custom MailTips. This gives you the ability to now retrieve a custom property that is stored within Active Directory via EWS. Which provides a workaround to not being able to access the information in the AD Custom Attributes http://technet.microsoft.com/en-us/library/ee423541.aspx curre
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.