O'Reilly logo

Microsoft Exchange Server PowerShell Cookbook - Third Edition by Mike Pfeiffer, Jonas Andersson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 `
'administrator@contoso.com','dave@contoso.com' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required