Skip to main content
Export-MailboxMappings

Create a CSV mailbox mapping file to use with the Copy-Mailbox PowerShell command

Updated over 3 weeks ago

Command

Export-MailboxMappings

Description

The Export-MailboxMappings command generates a CSV mapping file that matches your source and destination mailboxes.

Mailboxes with no match at the destination are left blank and must be matched manually.

Note: We recommend reviewing the resulting file to ensure accuracy.

Examples

Create a mapping file for source and destination tenants.

$source = Connect-MicrosoftOnline
$destination = Connect-MicrosoftOnline
Export-MailboxMappings -SourceConnection $source -DestinationConnection $destination -Path "C:\MyMappings\"

Syntax

Export-MailboxMappings
-SourceConnection <Connection>
-DestinationConnection <Connection>
[-Path <FileInfo>]
[-Overwrite]

Parameters

-DestinationConnection <Connection>

Specifies the destination connection.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-Overwrite <SwitchParameter>

Specifies that file will be overwritten if already exists.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-Path <FileInfo>

Specifies the path where you want to save the file. The supported format is CSV.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-SourceConnection <Connection>

Specifies the source connection.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

Did this answer your question?