Apoc70 / New-MailboxMigrationCsv

PowerShell script to create CSV files for Exchange Server migration batches

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New-MailboxMigrationCsv

Export primary email addresses of Exchange mailboxes as Csv in preparation for mailbox migration batches.

Description

This script exports the primary email address of Exchange mailboxes as a single Csv file using "EmailAddress" as column header. The scripts splits the Csv-file into batch-size Csv files. You can use these Csv files as input files when creating mailbox migration batches. You can define number of email address per splitted Csv file. The scripts allows for exporting a selected mailbox recipient type or all mailbox types.

Tested with Exchange Server 2016 and Exchange Server 2019.

Requirements

  • Windows Server 2016+
  • Administrative Exchange Server 2016+ Management Shell

Parameters

Parameter MailboxType

Switch to select the mailbox type you want to export. Options are User, Shared, Room, Arbitration, PublicFolder, Equipment, All

Database

If set, the script fetches only mailboxes stored in that database.

BatchSize

The number of email addresses per split CSV file, aka batch size. Default: 25

ViewEntireForest

Switch parameter to set the search scopt to the entire Active Directory forest. The switch might be required when exporting arbitration and system mailboxes and the AD forest uses multi-domain infrastructure.

UseBatchFolder

Switch parameter to store splitted Csv files in a sub-folder named \Batches

Examples

.\New-MailboxMigrationCsv.ps1 -MailboxType User

Export all user mailboxes and create Csv files of 25 users per file, store Csv files in the script folder

.\New-MailboxMigrationCsv.ps1 -MailboxType Room -BatchSize 75 -UseBatchFolder

Export all room mailboxes and create Csv files of 75 mailboxes per file, store Csv files in \Batches folder.

.\New-MailboxMigrationCsv.ps1 -MailboxType Room -BatchSize 20 -UseBatchFolder -Database DB01

Export all room mailboxes of database DB01, create Csv files of 20 mailboxes per file, and store Csv files in \Batches folder.

Note

THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.

Credits

Written by: Thomas Stensitzki

Stay connected

For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos

About

PowerShell script to create CSV files for Exchange Server migration batches

License:MIT License


Languages

Language:PowerShell 100.0%