Name
Set-UserAndGroupMapping
SYNTAX
Set-UserAndGroupMapping [-Source] <String> [-Destination] <String> [[-MappingSettings] <MappingSettings>]
Set-UserAndGroupMapping [-Source] <String> [-Ignore] <SwitchParameter> [[-MappingSettings] <MappingSettings>]
Set-UserAndGroupMapping [-UnresolvedUserOrGroup] <SwitchParameter> [-Destination] <String> [[-MappingSettings] <MappingSettings>]
DESCRIPTION
The command to add or update a user or group mapping in the mapping settings.
PARAMETERS
-Destination <String>
Specifies the destination user or group.
Required? | True |
Position? | 2 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | Default, Unresolved |
Aliases | None |
-Ignore <SwitchParameter>
Specifies to ignore the user or group.
Required? | True |
Position? | 2 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | ExplicitIgnore |
Aliases | None |
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | False |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Source <String>
Specifies the source user or group.
Required? | True |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | Default, ExplicitIgnore |
Aliases | None |
-UnresolvedUserOrGroup <SwitchParameter>
Specifies to use unresolved users or groups for the source.
Required? | True |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | Unresolved |
Aliases | None |
INPUTS
MappingSettings
OUTPUTS
MappingSettings
The resulting mapping settings after the operation.
EXAMPLES
-------------- Example: Set custom mappings --------------
$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 PropertyMappings : ContentTypeMappings : UserAndGroupMappings : <Unresolved users or groups> -> Old employee Group John Doe -> Paul Smith myusername -> anotherusername PermissionLevelMappings : SiteTemplateMappings :
-------------- Example: Set custom mappings on existing mappings from 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 = 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 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 :