Skip to main content
Export mailbox mapping
Updated over 2 weeks ago

Command

Export-MailboxMappings

Description

This command gets all the mailboxes from the source tenant and generates a CSV file with the result. It then tries to find a matching mailbox in the destination tenant. If it finds a match, it adds the matching mailbox next to the source mailbox in the CSV file. Other mailboxes will be left blank and will need to be matched manually. Review the results 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 exist.

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. 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?