Skip to content

Moving Exchange Mailbox Users Account in Different OU Windows 2008 Domain Controller- Management Shell

April 12, 2011

Open Management Shell on Exchange server where Remote Server Administration Tools Role and Exchange Management Shell installed to perform following step:

  1. Enter all the user mailbox aliases as a list in a file called “alias_list.csv” in folder c:\data. 

                 Note: keep headline of list as “alias” see example below:

                Contents of “alias_list.csv” should look like Figure 1.                

Figure 1: Alias_list file

Figure 1: Alias_list file

 2. Run commands below to get Distinguished Name of these users:

Start-transcript  c:\data\Log\OUmove.log

Import-Csv c:\data\alias_list.csv | foreach { get-mailbox $_.alias| fl DistinguishedName }  > c:\data\dn.csv

3.  Modify content of “Dn.csv” to look like figure 2 below (Tip: You can use Excel for these modifications)

Figure 2: DN

 4. Modify -newparent value with DN of Destination OU. Run Command below

Import-Csv c:\data\dn.csv | foreach { dsmove  $_.dn  -newparent “OU=USA,OU=Accounts,DC=maha,DC=IN”} 

5. Verify Logs stored in file c:\data\Log\OUmove.log


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: