Bulk Import from GMail (or any IMAP server) to Exchange

This command appears to have been removed in 2013, but it’s one that is worth documenting anyway since it may be worth spinning up a 2007-2010 server to use it if you find yourself needing to migrate off that mistake someone previously made by moving everyone to Google apps, and back to Exchange.

CSV Columns:


$UserDetails=Import-Csv mail-import.csv

foreach($ID in $UserDetails) {

	$Display = "Starting " + $ID.SourceIdentity
	Write-Host $Display

	Move-IMAPMailboxToExchange -SourceLoginID $ID.SourceIdentity -SourcePassword $ID.SourcePassword -TargetIdentity $ID.uName -	TargetClientAccessServer 'ABC-01-EX10.ABC.local' -SourceServer $ID.SourceServer -SourceIdentity $ID.SourceIdentity -MaxThreadCount 1

	$Display = "Completing " + $ID.SourceIdentity
	Write-Host $Display


I personally haven’t used this since Exchange 2007, but when I did it saved me countless hours importing about 150 users mailboxes worth of content from GMail into a new Exchange org.