Fix those IMCEAEX NDRs

I had a customer migrate some mailboxes a few weeks ago, and they’re now just getting some NDRs.  Here’s a sample NDR: To fix this, you can take the NDR that you receive, copy/paste it into this function, and then take the resultant decoded x500 address and add it back to the proxyAddress array for…


Updates to Office 365 Proxy PAC Generator

I wrote the original Proxy PAC tool for a customer almost a year ago, and since have added a lot of new functionality.  Rather than updating my previous blog posts about it, I thought I would start a fresh thread.  If you want some background on how Proxy PAC files work and how to distribute…


Use AADConnect to add a Proxy Address

* UPDATE* After doing this originally, I decided to take a different route and write it back to the on-premises AD, so that way, the objects are synchronous.  This post now reflects the updated content. A few weeks ago, I had an issue where I needed to remove a proxy address from the proxyAddresses array…


Quick and Dirty Array Subtraction – Otherwise known as “Just say NO to VLOOKUP”

Today, I had to subtract one list of users from another list of users.  Some Excel wizards can do this with VLOOKUP, but I spend more time in trial-and-error with VLOOKUP and verifying my results that it would take to just do a CTRL-F for every object.  It’s really painful for me. Like, embarrassingly painful….


Disable Office 365 Groups Creation

Update: There are new cmdlets available for this task.  This blog is for historical reference only.  A new, updated process is available here ( Office 365 Groups are a (somewhat) new feature that act both like a distribution list and a public folder or shared mailbox.  When it comes to team notification and collaboration, the…


Testing for bad SMTP Addresses

While working on my latest project,  I encountered a significant number of objects with malformed SMTP addresses.  These appeared to have been objects that had been somehow manually modified over the years by directly writing to the proxyAddresses attribute in Active Directory, bypassing an API that would check for correctly-formatted addresses. As part of a migration…


Use AADConnect to Populate Office 365 Usage Location

So, a million years and tens of thousands of lines of code ago, I wrote a script for a customer to populate the Office 365 UsageLocation property (Set-MsolUser -UsageLocation) with the ISO country codes from Active Directory.  In Office 365, UsageLocation is used to determine what features are available to your users. If you have the…


Create an Opt-Out Tool for Exchange Online

Earlier this week, a question popped up on a distribution list for managing an opt-out process with Exchange Online.  That wasn’t the first request I’ve seen for such a tool (in fact, I had my own customer asking for something similar).  Of course, it’s much more fun to solve someone else’s problems than your own,…


How to Merge Duplicate Mail-Enabled User and Contact Objects

One of the first steps in preparing for an Office 365 migration is running a tool we provide called IDFix.  The goal of this tool is to help minimize identity issues when migrating to the cloud.  Most identity issues come down to two issues: Invalid characters in key attributes User objects with duplicate values in…


Creating a Pinpoint DNS Zone

I saw an interesting question floating around a discussion alias earlier today–how to return different IP addresses for the same hostname from different DNS servers for users that are in different regions (for example, have DNS servers on the east coast return “” for and DNS servers on the west coast return “” for same name–the…