Book Image

Microsoft Exchange Server PowerShell Cookbook

Book Image

Microsoft Exchange Server PowerShell Cookbook

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

E-mail notification on mailbox moves


Exchange 2013 introduced the new New-MigrationBatch cmdlet, which includes a built-in automatic reporting feature for moving mailboxes, together with a more flexible way of moving collections of mailboxes. In this recipe, we will take a look at how to move mailboxes with the new features and check out the report.

How to do it...

To create a migration batch (move request) for moving a collection of mailboxes to another database within the Exchange organization, use the New-MigrationBatch cmdlet, as shown in the following command:

New-MigrationBatch –Name "Move Batch" –CSVData `
([System.IO.File]::ReadAllBytes("C:\localmove.csv")) `
–Local -TargetDatabase DB2 –NotificationEmails `
'[email protected]','[email protected]' -AutoStart
Get-MigrationUser | 
Get-MigrationUserStatistics | ft –Autosize
Complete-MigrationBatch –Identity "Move Batch"

The following is a screenshot with the migration statistics:

The following screenshot shows an example from a notification...