EMEA Developer Support for Messaging Team Blog

Messaging Developer code samples and documentation

Browse by Tags

Tagged Content List
  • Blog Post: PowerShell: Update folders (delete/purge, or add/delete properties)

    Attached is a script that allows you to update folders by adding or removing properties. You can also use the script to purge or delete the folders. To delete properties from a folder: .\Update-Folders.ps1 -Mailbox 1@e14.local -FolderPath "\Folder 1" -ProcessSubFolders -DeleteFolderProperties ...
  • Blog Post: PowerShell: Search for appointments

    You can use the Exchange cmdlet Search-Mailbox for a wide variety of searches, but it does have some limitations. Attached here is a PowerShell script that uses EWS to search appointments, and as the script uses both server and client side search it can be used to performs searches that aren't possible...
  • Blog Post: PowerShell: Remove duplicate calendar appointments

    We regularly get requests for an automated way of deleting duplicate appointments from calendars (most often caused by migration issues or mistaken mailbox imports, but there are lots of reasons that you could end up with duplicates). So, here is a script that checks for and deletes duplicates. As usual...
  • Blog Post: EWS: Update Out-of-Office (OOF) sample application

    This sample program shows how the OOF message can be manipulated using the EWS Managed API. Full source (Visual Studio 2013) is included, and the program can be run from the command-line (so can be incorporated into scripts) or with UI. When run from the Visual Studio IDE, the UI will be shown and any...
  • Blog Post: PowerShell: Merge mailbox folders

    A couple of years ago I wrote a script to move items from one folder to another in a user's mailbox. This seems to be one of the most commented posts on this blog, and we also regularly get requests for this kind of functionality. I haven't had a chance to respond to many of the comments of the previous...
  • Blog Post: PowerShell: Search for a contact within a mailbox (or multiple mailboxes)

    The attached script shows how to use EWS to search for a particular contact (based on email address) within one or more mailboxes, writing any found occurrences to a log file. You can process multiple mailboxes in a couple of ways (well, there are probably other alternatives too, but these should cover...
  • Blog Post: Troubleshooting Exchange 2013 Mail Apps – ExecuteEwsProxy calls

      The ExecuteEwsProxy call The ExecuteEwsProxy call servers as a means of sending through EWS requests from Mail Apps. The implementation of the ExecuteEwsProxy call can be reduced to six basic steps: The app post an ExecuteEwsProxy call to OWA (Frontend) ( https://OWA_DNS_NAME:443/owa/service.svc...
  • Blog Post: PowerShell: Setting the global reading pane view in OWA

    Attached is a script that can be used to update the global reading pane view for OWA, and can be run against multiple mailboxes from PowerShell. It requires the EWS Managed API to be installed on the client machine, and if running against multiple mailboxes you'll need to grant impersonation rights to...
  • Blog Post: How to clear SIDHistory and keep mailbox permissions

    The SIDHistory attribute of a user object is used to store old SIDs for that user (usually SIDs from other domains when the user is migrated). In some cases, over time, this attribute can hold lots of values (every time a user is migrated, the previous SID is added to the list), and we sometimes get...
  • Blog Post: PowerShell: Clean Mailbox Delegates (update)

    I wrote a script a while ago that can remove invalid delegates from a mailbox using a mixture of EWS and Exchange PowerShell. The limitation of the original script is that is didn't do anything about the hidden rules that forward messages to delegates, which means that the unexpected NDR issue (as described...
  • Blog Post: EWS: Missing SOAP headers when using the EWS Managed API

    We’ve recently had a few cases where some SOAP headers were missing from the request when performing specific operations and targeting specific Exchange versions. This resulted in incorrect data being returned. For example, if you Target Exchange2010 or higher and wish to reply to or forward an EmailMessage...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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 user1.ex2k7@hybrid.local "Folder 1;Folder 2" By default, folders are created under the inbox. For multiple folders (as above), separate...
  • Blog Post: 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 user1.ex2k10@hybrid.local "Test Folder" "02/Aug/2013" -Impersonate -SearchForFolder The above will search for the first folder called...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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 SOAPe ) to respond to the notifications. The listener form has been...
  • Blog Post: 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...
  • Blog Post: PowerShell: Clean mailbox delegates

    An updated version of this script (that also handles the hidden forwarding rule) is available here: http://blogs.msdn.com/b/emeamsgdev/archive/2014/05/16/powershell-clean-mailbox-delegates-update.aspx Granting delegate access to a mailbox stores the permission on the mailbox to which the permission...
  • Blog Post: 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...
  • Blog Post: 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...
Page 1 of 2 (42 items) 12