Name
Get-UserAndGroupMapping
SYNTAX
Get-UserAndGroupMapping [-SourceSite] <Site> [-DestinationSite] <Site> [[-MappingSettings] <MappingSettings>]
Get-UserAndGroupMapping [-FromFileSystem] <SwitchParameter> [-DestinationSite] <Site> [[-MappingSettings] <MappingSettings>]
DESCRIPTION
The command to get the user and group mappings from a source site and a destination site.
PARAMETERS
-DestinationSite <Site>
Specifies the destination site.
Required? | True |
Position? | 2 |
Default value | |
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 |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | FileSystem |
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 |
-SourceSite <Site>
Specifies the source site.
Required? | True |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
INPUTS
MappingSettings
OUTPUTS
MappingSettings
The mapping settings merged with the user and group mappings from a source site and a destination site.
EXAMPLES
-------------- Example: Get mappings from a source site and a destination site --------------
$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 :
-------------- Example: Get mappings from the file system and a destination site --------------
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $mappingSettings = Get-UserAndGroupMapping -FromFileSystem -DestinationSite $dstSite $mappingSettings PropertyMappings : ContentTypeMappings : UserAndGroupMappings : OFFICE\Employee -> Sales&Marketing Owners OFFICE\sg.achille -> i:0#.w|office\sg.baptiste OFFICE\sg.camille -> i:0#.w|office\sg.denis PermissionLevelMappings : SiteTemplateMappings :
-------------- Example: Merge mappings with mappings from a source site and a destination site --------------
$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" $srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $mappingSettings = Get-UserAndGroupMapping -MappingSettings $mappingSettings -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 :
Comments
0 comments
Please sign in to leave a comment.