If you have many users to manually map in the Map users and groups window, you can use PowerShell to generate the mapping file using a CSV file.
The CSV file needs to be created beforehand and must contain information that can be found in the SharePoint people picker.
CSV File Creation
Here's how you can fill your CSV file. In the current example, my two columns are named SourceValue and DestinationValue, and we will set the variable $csvfile:
In this case, the email was used, but it can also be the username, the display name, the full name. The only condition is that it's found using the people picker.
$csvfile = "C:\CSVfile.csv"
#Create a table based on the csv
$table = Import-Csv $csvFile -Delimiter ","
#Declaration of the mapping settings:
$mappingSettings = New-MappingSettings
#Cycle through each row of the CSV
foreach ($row in $table)
#Add the current row source user and destination user to the list of mappings
Set-UserAndGroupMapping -MappingSettings $mappingSettings -Source $row.SourceValue -Destination $row.DestinationValue
#The user and group mappings are exported to C:\FolderName\FileName.sgum
Export-UserAndGroupMapping -MappingSettings $mappingSettings -Path C:\FolderName\FileName
Once this is done, you can then use the FileName.sgum file in your migration script by using the following line:
$mappingSettings = Import-UserAndGroupMapping -Path C:\FolderName\FileName.sgum
You can also Import this file in the Sharegate UI by pressing the Import button in the Map users and groups menu.