Command
Save-UserAndGroupMapping
Description
The command to save all the user or group mappings for a specific source and destination site.
Index
Examples
Save custom mappings for a source list and a destination list
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $mappingSettings = Get-UserAndGroupMapping -SourceSite $srcSite -DestinationSite $dstSite $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 : $mappingSettings = Set-UserAndGroupMapping -MappingSettings $mappingSettings -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 = Save-UserAndGroupMapping -MappingSettings $mappingSettings -SourceSite $srcSite -DestinationSite $dstSite $mappingSettings = Get-UserAndGroupMapping -SourceSite $srcSite -DestinationSite $dstSite $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
Save-UserAndGroupMapping -MappingSettings <MappingSettings> -SourceSite <Site> -DestinationSite <Site>
Save-UserAndGroupMapping -MappingSettings <MappingSettings> -FromFileSystem <SwitchParameter> -DestinationSite]<Site>
Parameters
-DestinationSite <Site>
Specifies the destination site.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-FromFileSystem <SwitchParameter>
Specifies that the source is the file system.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | FileSystem |
Aliases | None |
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-SourceSite <Site>
Specifies the source site.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |