PowerShell: Convert ConversationHistory from UserCreated to a Default Folder

Time for a new article, this time talking about Conversation History Retention Policies. I have recently been working with some customers who reported that Retention Policies applied to Conversation History would not get applied. After a lengthily investigation it appeared the issue was due to the “Conversation History” folder was not of type “CommunicatorHistory” but…

0

PowerShell: Remove meetings that may cause problem with ActiveSync Devices

It’s again time to talk about ActiveSync. It seems rather frequent that users, most often VIP, ends up missing a meeting because one or more did not synchronize (or rather the handset did not handle the data correctly). Mainly, this comes down to few common user error: The meeting is a recurring meeting with no…


PowerShell: Remove outdated ActiveSync Devices

Howdy Exchange Administrators! How often have you had to undertake the task of cleaning stale device from user mailboxes and how often did you need to go and manually delete the AirSync-* folders via either MFCMAPI or EWSEditor? Probably many. As some administrators (legitimately) like to keep the mailboxes tidy or they might have a business/process…


PowerShell: Apply Retention Policies or Auto-Archive Settings to Inbox sub-folders

This week I’ve been spending some time in reviewing how Exchange Retention Policies and Outlook Auto-Archive setting are stored in a user mailbox.   If you’re wondering whether to start using Outlook Auto-Archive or the Exchange Retention policy I would like to call out some differences.   How important is enterprise data? If the answer to this…

2

EWS Managed API Trace Listener

MSDN has some sample code showing how to implement a trace listener for the EWS Managed API (which is crucial for debugging EWS applications).  However, the sample trace listener isn’t actually very good for a variety of reasons (it creates different files for each trace type, and will actually overwrite the previous trace if the…


PowerShell/EWS: Searching for and deleting duplicate mailbox folders

We’ve had some cases recently where an issue with migration has caused the migrated mailbox to contain duplicate folders (e.g. there may be two Calendar folders).  I have written a script that can process mailboxes and automatically remove duplicate folders.  In the case of special folders (Inbox, Sent Items, etc.) the correct folder will be…


EWS: How to send signed email using the EWS Managed API

A question that keeps popping up is how to send signed or encrypted email using EWS.  A colleague (thank-you Vladimir!) has recently put together some sample code showing how to do exactly that using the EWS Managed API.  Based on his sample code, I’ve been able to partially complete my Windows Forms application that shows how…


PowerShell: Remove duplicate items from a mailbox

I’ve extended the script I posted a few months ago so that now it can search for duplicate contacts and email items (not just appointments).  I’ve posted the script to the Office Developer Centre, and rather than having to maintain two pages, I’ll just leave a link here: https://code.msdn.microsoft.com/exchange/PowerShellEWS-Remove-54228d71 Any new code samples will be…


PowerShell: Update folders (delete/purge, or add/delete properties)

Please note: the script has now been moved to https://code.msdn.microsoft.com/PowerShell-Update-mailbox-1e17866d. This script 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 @(“0x36160102”, “0x36DA0102”) In the above example, MAPI properties…


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 with Search-Mailbox (and…