Skip to main content

Posts

Showing posts from March, 2012

EWS Managed API and Powershell How-To Series Part 6 FreeBusy and OOF Operations

In this post I'm going to continue looking at the special operations in EWS that allows you to get and set the unconventional data that is stored in an Exchange mailbox like the FreeBusy information and the Out of Office Message. First off lets look at the FreeBusyTime.   Getting Freebusy time Freebusy information is one of the more useful calendar features that Exchange offers in EWS the ability to access the freebusy information is provided by the GetUserAvailiblity operation . This operation can be useful in a number of scenarios especially when you may want to query a large number of calendars. One example is a freebusy board or meeting room website When you make a FreeBusy request there are two constraints on the request that are outlined in http://technet.microsoft.com/en-us/library/hh310374.aspx   "By default, Exchange 2007 accepts availability requests for 42 days of free/busy information and Exchange 2010 may request 62 days of free/busy information. If

How To Series Sample 5 : Clearing the Suggested Contacts with EWS and Powershell

In Outlook 2010 "Suggested Contacts" is  feature that automatically creates a Contact for each address you send an email to   . If you need clear this folder for any reason you can do this in EWS in 2010 using the new Empty operation which allows you to easily delete all the Items within a folder (without the need to use a batch operations). Here's a example of how to clear the Suggested Contacts folder note its deletes stuff so be careful. For more information about the AutoComplete cache see  http://gsexdev.blogspot.com.au/2013/10/exporting-suggested-contacts-owa-auto.html I've put a download of this script here the script itself looks like ## Load Managed API dll    Add-Type -Path  "C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll"       ## Set Exchange Version    $ExchangeVersion  = [Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1      ## Create Exchange Service Object    $s

EWS Managed API and Powershell How-To Series Part 5 Delegate Operations

This is part 5 of my ongoing EWS and Powershell How-To series in this part I'm going to be looking at the special EWS operations starting with the Delegate operations in this post. The Tale of Two Delegates (it is the 200th Anniversary of dickens) When you talk about delegates with EWS it can be a little confusing because it could be your talking about accessing another mailbox as a delegate for example . For example to access another mailboxes Inbox as a Delegate you would use $folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Inbox, $MailboxName )      $Inbox  = [Microsoft.Exchange.WebServices.Data.Folder]::Bind( $service , $folderid )    The other type of Delegates are the assigning of Mailbox permissions via the use of the Delegate Operations or to put it pictorially this function in Outlook Delegates are always the best way of assigning shared rights to users Mailbox and Calendar fold

How To Series Sample 4 : Reporting on Items of a certain Type

This is the forth of my samples based on the EWS Managed API and Powershell how to series this script shows a method you can use to produce a report of all the Items within a Mailbox based on one particular Item type. Eg if you want to show the size and number of Items for a custom Message class eg "IPM.Note.Myclass" or a another third party item type like IPM.Note.EnterpriseVault.ShortCut etc. This script first gets all the folders within a mailbox then gets all the Items of a particular ItemClass using a Searchfilter. Its then adds the number of Items and their size and produces a final CSV type report at the end showing the FolderPath and number and size details. I've put a download of this script here the code looks like ## Load Managed API dll    Add-Type -Path  "C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll"       ## Set Exchange Version    $ExchangeVersion  = [Microsoft.Exchange.WebServices.Data

How To Sample 3 - Scanning all folders in a mailbox for updated Items in EWS

This is the third of my samples based on the EWS Managed API and Powershell how to series I've been writing so if your looking for background on this please refer to these other posts. EWS has a number of good Synchronization operations which I'll be covering in future posts but i thought I'd go through another method you can use if your looking to find new Items or changed items in a Mailbox. For example say you have a mailbox with a complicated folder structure with a number of Inbox rules that moves messages to different Folders and you want a script that that will look at all the folders in a Mailbox and only query those folders where the Items in that folder have been updated say since yesterday and return information about those items. The property you need to use on a folder to know if the underlying Items have change is the PR_LOCAL_COMMIT_TIME_MAX which is one the properties using by ICS see . So we can basically use this property within a Searchfilter in E
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.