Command
Import-MailboxMappings
Description
The command to import mailbox mappings from a file.
Note: When you export your mailbox and recipient mappings in the app, they are separated. To combine the mappings you exported from the app for PowerShell, see Combine your mailbox and recipient mappings for PowerShell.
Examples
Import mailbox mappings from a file
$filePath = "c:\MailboxMappingsToImport.csv" $sourceConnection = Connect-MicrosoftOnline $destinationConnection = Connect-MicrosoftOnline Import-MailboxMappings -SourceConnection $sourceConnection -DestinationConnection $destinationConnection -Path $filePath
Import mailbox mappings from the export mappings command result
$filePath = "c:\MailboxMappingsToImport.csv" $sourceConnection = Connect-MicrosoftOnline $destinationConnection = Connect-MicrosoftOnline # Export all mailbox mappings once, than reuse the file for your future import commands Export-MailboxMappings -SourceConnection $sourceConnection -DestinationConnection $destinationConnection -Path $filePath Import-MailboxMappings -SourceConnection $sourceConnection -DestinationConnection $destinationConnection -Path $filePath
Syntax
Import-MailboxMappings
-SourceConnection <Connection>
-DestinationConnection <Connection>
-Path <FileInfo>
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 |
-Path <FileInfo>
Specifies the .csv file path to map the source mailboxes.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue) |
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 |