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: Deploying Outlook ribbon customisations

The Outlook ribbon can be customised by users, and any such changes are stored in an Xml file in the user’s AppData folder (by default, this will be %LocalAppData%\Microsoft\Office – though this can be changed to roaming AppData using a registry key).  Sometimes a company may want to have specific functionality (or custom functionality) available…


PowerShell: Batch moving/merging mailboxes

The Merge-MailboxFolder script is very powerful in that it can move data between mailboxes (even entire mailboxes, if desired).  It can also be used to process lots of mailboxes at once.  This blog post is going to run through in detail the procedure to move all items from the archive mailbox into the main mailbox…


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

PowerShell: Batching operations to avoid throttling.

More and more often we are receiving escalations as well as general questions on how to batch a given command, in order to avoid throttling or long running sessions that terminates with disconnections. While this may be rather straight-forward to implement, at some times it is inconvenient to build a whole script just to execute…

0

PowerShell: Split and search large text files

While this isn’t strictly Messaging Development, the attached PowerShell script can be very useful when having to deal with very large text files.  I’ve used it against files of nearly 1Gb in size (which no text editor wants to open, for understandable reasons).  It incorporates a simple text search too, so it is easy to…


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…


You cannot create multiple System.Management.Automation runspaces in a web application for two or more different users if you use implicit credentials

Update: This information has been published as a KB article: https://support.microsoft.com/en-gb/kb/3115600. When you try and allow multiple users to create System.Management.Automation runspaces in a web application, if you are using implicit credentials (i.e., credentials from impersonation), you will notice that only the first user that accesses the web application is able to call CreateRunspace.  All…

0

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…