Archive

Archive for the ‘Exchange’ Category

So where have I been? Exchange 2010!

October 3, 2012 Leave a comment

So it’s been over 3 months since I posted anything to this blog and some of you may have wondered if I gave up on it.  I haven’t given up but I haven’t been posting much because I am working on a huge Exchange upgrade for my employer.  We are migrating from 2003 to 2010 and this project has been taking up most of my time.  We are consolidating 15 Exchange servers in 7 different countries down to just 6 servers in 3 countries.  We are using this consolidation opportunity to also deploy some server redundancy that we never had before (DAG and CAS makes this easy!) too.  It’s been a demanding project but we are in the home stretch now.  Over the next few weeks I’ll be putting up some posts about Exchange 2010 and things I’ve learned. 

Here’s a few links I want to share.

I’m hoping once this project settles down I’ll have some time to work on DISM GUI 4.0.  I’ve been collecting the ideas and hoping I can implement some of them. 

Categories: Exchange Tags:

Exchange 2010 Mailbox Moves from CSV file

October 3, 2012 7 comments

Recently during our Exchange migration I wanted a way to automate our mailbox moves.  Even though PowerShell makes this is very easy to script I couldn’t just use a normal filter because the mailboxes I am moving need go to one of three different databases.   I couldn’t use the New-MoveRequest cmdlet with a normal filter because none of the mailboxes had any common attributes to filter on.    Instead I created a CSV file with the mailbox name and the target databases.  In the past this would have meant many lines of VBscript code but with PowerShell this can all be done with a one liner!  Then using PowerShell I read this information in and pipe it over to the New-MoveRequest cmdlet to initiate the mailbox moves. 

My CSV file looks like this.

UserID TargetDB
User01 MBX01
User02 MBX03
User03 MBX02

The PowerShell script looks like this.

Import-Csv .\Filename.csv | % {New-MoveRequest -Identity $_.UserID 

-TargetDatabase $_.TargetDB}

I also created another one for ad-hoc moves.  This Powershell script allows me to specify the CSV file that I want to use instead of hardcoding it into the script.

 

$csvfile = Read-Host "Enter in the name of the CSV File that contains the mailboxes you want to move"

Import-Csv $csvfile | % {New-MoveRequest -Identity $_.UserID -TargetDatabase $_.TargetDB}

If you haven’t started using PowerShell for scripting tasks I highly recommend that you start looking into it.  It’s got a bit of a learning curve but it’s very powerful once your get a good grasp on it.

Categories: Exchange, Powershell Tags: ,