Note: PowerShell integration requires a ShareGate Migrate Pro or Enterprise subscription. It is not available on the Essentials plan.
Command
Export-UserMappings
Description
Export-UserMappings gets all the chat users from the source tenant and generates a CSV mapping file. It looks for a matching user in the destination tenant for each one and, when it finds a match, adds it next to the source user in the file. Users without a match are left blank for you to fill in manually before using the file with Import-UserMappings.
Examples
Create a chat user mapping file for the source and destination tenants
$source = Connect-MicrosoftOnline -CopyFeature ChatCopy
$destination = Connect-MicrosoftOnline -CopyFeature ChatCopy
Export-UserMappings -SourceConnection $source -DestinationConnection $destination -Path "C:\MyMappings\"
Overwrite an existing chat user mapping file
$source = Connect-MicrosoftOnline -CopyFeature ChatCopy
$destination = Connect-MicrosoftOnline -CopyFeature ChatCopy
Export-UserMappings -SourceConnection $source -DestinationConnection $destination -Path "C:\MyMappings\ShareGateUsersMapping.csv" -Overwrite
Syntax
Export-UserMappings
-SourceConnection <IConnection>
-DestinationConnection <IConnection>
[-Path <FileInfo>]
[-Overwrite]
Parameters
-DestinationConnection <IConnection>
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 the file is overwritten if it 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. Supported format is CSV.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-SourceConnection <IConnection>
Specifies the source connection.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
