Command
Import-UserAndGroupMapping
Description
The command to import the user and group mappings from a file.
Index
Examples
Import mappings from file
$mappingSettings = Import-UserAndGroupMapping -Path "C:\MyMappings\MyUserAndGroupMappingsFileName.sgum" $mappingSettings PropertyMappings : ContentTypeMappings : UserAndGroupMappings : CustomPermissions Members -> Sales&Marketing Owners i:0#.w|office\sg.achille -> i:0#.w|office\sg.baptiste i:0#.w|office\sg.camille -> i:0#.w|office\sg.denis PermissionLevelMappings : SiteTemplateMappings :
Merge mappings with mappings from file
$mappingSettings = Set-UserAndGroupMapping -Source "John Doe" -Destination "Paul Smith" $mappingSettings = Set-UserAndGroupMapping -MappingSettings $mappingSettings -Source "myusername" -Destination "anotherusername" $mappingSettings = Set-UserAndGroupMapping -MappingSettings $mappingSettings -UnresolvedUserOrGroup -Destination "Old employee Group" $mappingSettings = Import-UserAndGroupMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyUserAndGroupMappingsFileName.sgum" $mappingSettings PropertyMappings : ContentTypeMappings : UserAndGroupMappings : <Unresolved users or groups> -> Old employee Group CustomPermissions Members -> Sales&Marketing Owners i:0#.w|office\sg.achille -> i:0#.w|office\sg.baptiste i:0#.w|office\sg.camille -> i:0#.w|office\sg.denis John Doe -> Paul Smith myusername -> anotherusername PermissionLevelMappings : SiteTemplateMappings :
Syntax
Import-UserAndGroupMapping -Path <String> [-MappingSettings <MappingSettings>]
Parameters
-MappingSettings <MappingSettings>
Specifies the mapping settings. You can use this command to add multiple mapping settings to an existing mapping settings object. For more details, see Use multiple mapping files at once.
Required? | False |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Path <String>
Specifies the file path that was previously exported with Sharegate.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |