Skip to main content

Mailbox Move Request by Organizational Unit

·236 words·2 mins
system-administration tech exchange exchange-2010 powershell sysadmin technology
James Pettigrove
Author
James Pettigrove
Cloud Engineer with a focus on Microsoft Azure

I’ll admit, I do love Active Directory. It allows me create great structure and sound groupings of a otherwise chaotic bunch of silicone and digital bits and bytes. As much as I love it, unfortunately not all applications can take advantage of a well organized Active Directory, especially in a GUI environment.

Exchange 2010 is one of these applications.

When performing Mailbox Move Requests in the GUI Exchange Management Console you are restricted by the search filters baked in. While this can serve most people and for most day to day functions; if you are doing things in bulk, sometimes you need a bit more control. For instance, what if I want to migrate mailboxes by Organizational Unit? Maybe I want to move the folks over in Accounting first, because they are known trailblazers (HA!). There is no option in the Management Console to define your search filter by Organizational Unit (many of the filters that can be utilized are purely Exchange attributes, which is puzzling because of the tight relationship AD and Exchange have).

Enter Exchange Powershell.

Get-Mailbox -OrganizationalUnit "OU=Accounting,OU=Users,DC=Contoso,DC=com" | New-MoveRequest -TargetDatabase "Internal Staff"

Nice and simple.

We have used Get-Mailbox to retrieve all the mailboxes from the specified Organization Unit (which must be in LDAP path format) and then piped it into the New-MoveRequest query and targeted a specific Mailbox Database.

When the GUI lets you down, turn to Powershell folks.

Happy Friday

Related

Export email addresses via Exchange Powershell
·298 words·2 mins
system-administration tech exchange exchange-2007 exchange-2010 powershell sysadmin technology
The other week I had a request for a list of all email addresses of staff for use with a legacy VOIP system.
Migrated your mailbox to Exchange 2010, ActiveSync connection stopped? You might be a Domain Administrator
·338 words·2 mins
system-administration tech active-directory activesync exchange exchange-2010 sysadmin technology
Came across an interesting little bug which probably would have gone unnoticed if I never migrated my mailbox to our new Exchange 2010 mail server.
So you're Virtualizing Exchange or how I was introduced to Back pressure
·735 words·4 mins
system-administration tech back-pressure event-id-15007 exchange sysadmin technology
The modern data centreĀ or server farm looks very different from 5 years ago.