2014/10/02 Update: New Version 1.1 has been released - fixed a bug that always causes moves to be suspended.
If you are going to use the Large Item Limit switch, please use it cautiously and ensure your users have the large items backed up.
I wanted to share a small personal project I've been working on with you.
I was finding it cumbersome and painful to keep track of my migrations into the cloud at my customers so I decided to build something quick and easy that can be executed from anywhere.
The aim of this was to allow me to:
The outcome was a simple spreadsheet that uses VBA to call PowerShell code depending on the functionality you want.
It’s relatively straightforward, the Excel file contains the following main sheets:
Mailboxes – this sheet contains the main mailbox data that the other areas use to build csv files for the PowerShell scripts.
Planned_Batch – this sheet is where most of the functionality is. In here you can Activate Licenses, Export Scripts for manual execution, initiate the mailbox migrations, show current moves, resume any suspended moves or just open a remote PowerShell session to Office 365.
The following buttons exist on this sheet:
You will need to populate all the areas marked with yellow with your relevant tenant details:
There are two option buttons:
Moved – Once your planned batch has been successfully migrated you mark the batch completed by changing the Move_Variable to “Moved”. This will allow the moved sheet to be updated with the relevant mailboxes that have been migrated to help you keep track of your migrations.
Move_Request_Statistics – This sheet allows you to track the data on the all your move requests. When you click on the Get-Statistics button it opens a remote PowerShell session to get some data from your current move request and export that to a csv file to the location you specified. You can then import this file and use the Average MB/min to help with the timing calculation in the Planned_batch sheet.
License Report - The two Licensing sheets allows you to export the raw license data from your tenant and import the data into the file. You can then use this report to reconcile your licenses and get an overview of the license situation.
Ok, so that covers the sheets and their functionality. So how would I start with this:
First download and install the Windows Azure Active Directory Module for Windows PowerShell:
When you open the Excel spreadsheet you will first need to populate the mailboxes sheet by running the following within the Exchange 2010/2013 management shell:
$mbx=Get-Mailbox -resultsize unlimited; $mbx | foreach-object {$UPN = $_.UserPrincipalName; $EmailAddress = $_.PrimarySmtpAddress;$OU = $_.OrganizationalUnit; $Type = $_.RecipientTypeDetails; $_ | Get-MailboxStatistics | select @{Name="UPN";expression={$UPN}},@{Name="EmailAddress";expression={$EmailAddress}},@{Name="Type";expression={$Type}},@{Name="OU";expression={$OU}},DisplayName,@{Name="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},LastLogonTime}|Export-csv .\Mailboxes_Output.csv –notype
The above will export the required data to a CSV file which you can then import into the Mailboxes sheet by using the button provided.
When you want to target a couple of mailboxes for migration you simply mark the Move_Variable column in the mailboxes sheet with an “X”. Refreshing the Planned_Batch sheet will populate the targeted mailboxes for migration.
I didn’t want to build an elaborate system that uses a database and a front end, because I wanted something quick and easy to use and for me this works. I’m sure there are some brilliant minds out there that will definitely have something to add so feel free to add wherever you want and share. The code is open and available to modify as you see fit.
One more thing, this spreadsheet is in no way an Official Microsoft Office 365 Tool and not maintained by Microsoft, it’s essentially a Michael maintained tool developed to make my life easier during mailbox migrations :-)
Download the tool here.
If you have any questions or want to give some feedback feel free to e-mail me here - technicalramblings@outlook.com or ask in the comment section below.
Happy mailbox migations!
Michael Hall
Does it works with Exchange 2007?
Just amazing Wow
Many Thanks Bro! great job!