Script for migrating Exchange inbox rules before a mailbox is moved to a different forest.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Claire e83cc5590e Update readme title 2 months ago
LICENSE Initial commit 2 months ago Update readme title 2 months ago
migrate-rules.ps1 Initial commit 2 months ago

Exchange Rules Migrator

This PowerShell script was originally developed when I was working in an Exchange support team at Microsoft. When an Exchange mailbox is moved between different forests, any saved inbox rules which refer to mailboxes internal to the user's forest will break, because intra-forest rules default to the LegacyDN format, which looks like [EX:/distinguished/name], rather than regular SMTP addresses.

This script connects to the user's current mailbox to determine the primary SMTP address for every LegacyDN reference in the mailbox's inbox rules. It then updates the rule on the server with the correct SMTP address, thereby mitigating the rules-breaking consequence of moving a mailbox between forests.

This script relies on the user having PowerShell access to their Exchange mailbox. Details on accessing Exchange over PowerShell may be found here.