EMEA Developer Support for Messaging Team Blog
Messaging Developer code samples and documentation
Translate This Page
Translate this page
CDO Reflection SMTP Code
drag and drop
EWS Managed API
exchange 2007 resources
Exchange Data Types
Exchange Management Shell
Exchange web services
Lync 2010 resources
lync dev resource
outlook development code contacts
Outlook Object Model
support troubleshooting trace log
Browse by Tags
EMEA Developer Support for Messaging Team Blog
Tagged Content List
PowerShell Automation from .Net
Even though this blog has numerous PowerShell scripts showing mainly how to use EWS from PowerShell, scripting isn't actually something my team supports (Exchange scripting support is provided by the Exchange team). What we do support, though, is automation of PowerShell from .Net. We've had a couple...
4 Mar 2014
EWS: Performance issues when accessing multiple mailboxes?
We've had a few cases come through over the past few months regarding slow performance against Office Online from an EWS service application. Several of them have come down to a very simple .Net setting that isn't necessarily obvious. In fact, I first hit the issue myself when creating a streaming notification...
27 Feb 2014
PowerShell: Create folders in users' mailboxes
Here is a PowerShell EWS script that will create folders (one or more) in users' mailboxes. To run it against a single mailbox, syntax is: .\Create-Folders.ps1 email@example.com "Folder 1;Folder 2" By default, folders are created under the inbox. For multiple folders (as above), separate...
20 Oct 2013
PowerShell: Purge folder of items over a certain age
This PowerShell script can be used to purge a folder of its contents, optionally only deleting items before a certain date. Example usage: .\Purge-MailboxFolder firstname.lastname@example.org "Test Folder" "02/Aug/2013" -Impersonate -SearchForFolder The above will search for the first folder called...
5 Aug 2013
PowerShell: Search public folders for items of a particular message class (ItemClass)
In addition to the mailbox search script , I have also written a sample script showing how to do the same search against public folders. It works in exactly the same way, but iterates public folder tree instead of the mailbox. The EWS Managed API needs to be installed on the machine running the script...
25 Jun 2013
PowerShell: Search mailbox for items of a particular message class (ItemClass)
The Search-Mailbox cmdlet can be used to perform various searches within a mailbox, and while it serves many needs, there are some searches that it can't do. I wrote a PowerShell script to demonstrate how to perform a search of a mailbox (or mailboxes) using EWS, in this case looking for items of a particular...
25 Jun 2013
EWS: Streaming Notifications and Exchange 2013 (and Office 365 Wave 15)
Exchange 2013 introduced a new affinity model which means that streaming subscriptions to multiple mailboxes need to be handled in a different way to earlier versions. If you are connecting to a single mailbox, you shouldn't have a problem, but you most likely will encounter issues if you are connecting...
4 Jun 2013
EWS: Hide a named folder in multiple mailboxes
Recently we've had a couple of requests that involved deleting or hiding mailbox folders that are created automatically either by Outlook or Lync. Deleting such folders is usually both not supported and also not possible - they will most likely be marked as distinguished folders, which means that they...
23 May 2013
EWS: Streaming Notification Sample
To complete my unintentional series on EWS notifications, I have written a sample application showing how to deal with streaming subscriptions. The application includes full logging of both events and EWS calls, so is very useful for troubleshooting. The screenshot below shows the application in action...
16 Apr 2013
EWS: Push Notification Sample
I wrote a sample application quite a while ago showing how to write a push notification client using WCF. This seemed a little complex to me, and I have now got another sample that uses the managed API and a custom listener (taken from SOAPTestApp ) to respond to the notifications. The listener form...
20 Dec 2012
PowerShell: Set Calendar folder delegate permissions in Exchange 2007
Exchange 2010 has cmdlets ( Add-MailboxFolderPermission , Set-MailboxFolderPermission ) that allow an administrator to update folder permissions on a user's calendar. Unfortunately, Exchange 2007 does not have these cmdlets. We recently had a case that required updating many mailboxes (in this case resource...
3 Dec 2012
PowerShell: Clean mailbox delegates
Granting delegate access to a mailbox stores the permission on the mailbox to which the permission is granted. But what happens when a user is deleted? The simple answer is nothing - deleting a user (or other AD object) does not delete references to that object in other places. What this means is that...
23 Nov 2012
EWS from a Web Application using Windows Authentication and Impersonation
To augment an earlier blog post that describes how to use EWS in a SharePoint webpart without needing ApplicationImpersonation, here I will go through the steps needed to do this from a standard web application. The scenario is that a web application (hosted on a standalone application server) needs...
5 Nov 2012
PowerShell: Remove invalid delegates from mailboxes
We recently had a case where there were invalid delegates on a mailbox and these were causing further issues (which aren't important with regards to this blog!). Invalid delegates can come about when mailboxes and users are deleted from an organisation. The reason for this is that delegate permissions...
31 Aug 2012
Exchange Web Services and SharePoint without ApplicationImpersonation
A question that I have seen crop up quite a bit on the internet is how to use EWS with a SharePoint webpart. Using EWS is quite easy, as you can simply reference the managed API and use that - but the main implementation headache is how to set up authentication. A lot of customers do not want to use...
26 Jul 2012
PowerShell: Script to set holiday status to busy (or OOF, free, etc.)
As you may or may not know, Outlook has a facility to import known public holidays. However, currently while these holidays will be imported into the Outlook calendar, the status of these holidays is set to Free. An often received request is for advice on how to change this status to Busy, or OOF. If...
11 Jun 2012
EWS Managed API: How to remove Email1, Email2, Email3 from a contact
An interesting case recently asked how to remove Email1, Email2, and/or Email3 from a contact using the EWS Managed API. If you try to set any of these properties to null, or an empty string, then you will receive an error when sending the request to Exchange (i.e. when you call Update()). There are...
17 May 2012
How to change the default item type of a folder (VBScript and OOM, or EWS)
It is possible to change the default item type of Outlook folders, and this is commonly done when custom forms are being used. The question came up recently asking whether it is possible to do this programmatically, and it certainly is. The default item type of a folder is stored in a single MAPI...
16 May 2012
Exchange 2010, EWS, Autodiscover and the MAPIEnabled property
Recently we had a case come in whereby a customer was having problems connecting to a mailbox using EWS against a Live@Edu mailbox. There were a few interesting points that came up during investigation of this case. In the first instance, we only support using Autodiscover with EWS to access any cloud...
1 May 2012
PowerShell: Script to move items from one folder to another in a user's mailbox
Manipulation of mailbox items is not something that is really available using Exchange cmdlets - understandably, as Exchange PowerShell is for administration of the Exchange environment rather than manipulation of mailboxes themselves. Of course, PowerShell itself offers all the features needed to be...
27 Apr 2012
PowerShell: Script to recover all deleted items in a mailbox
We had a request recently for a sample PowerShell script that shows how to recover deleted items from and Exchange 2010 mailbox. While not possible (as far as I am aware) using any standard Exchange cmdlets, it is certainly possible using the EWS Managed API. The script has been written so that it...
27 Apr 2012
PowerShell: Script to import calendar items into Exchange mailbox from CSV file
A recent case brought up the question of whether it is possible to import calendar items into a mailbox from a text file using PowerShell. While there aren't any cmdlets built-in that support this, it is certainly possible to implement this using PowerShell and the EWS Managed API. Sample script is attached...
13 Feb 2012
EWS Application: Disable OWA 2010 Conversation View
Exchange 2010 OWA Folder View Settings are stored in a MAPI property and are customizable per folder. Conversation View is enabled by default in OWA 2010 and even if you disable it on the existing folders, new folders you create will always have Conversation View enabled. The property that stores...
29 Dec 2011
Using Exchange Web Services from VBScript: Sending a message with attachment example
With Exchange 2010, CDO and all the other APIs that were commonly used from VBScript (e.g. WebDAV) are no longer supported. The only scriptable API is EWS. While it is relatively easy to use EWS using the managed API, this is not possible from VBScript. However, programming with EWS from VBScript can...
30 Nov 2011
Test Applications (SOAP and Webdav)
I have now published SOAPe, the SOAP (EWS) test application that I previously blogged about up to Codeplex. Documentation and updates will follow in due course. http://soape.codeplex.com/ I have also written a WebDAV test application that works in a very similar way, but supports WebDAV verbs...
1 Nov 2011
Page 1 of 2 (31 items)
© 2014 Microsoft Corporation.
Privacy & Cookies