Command
Export-UserAndGroupMapping
Description
The command to export the user and group mappings to a file.
Examples
Export 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" Export-UserAndGroupMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyUserAndGroupMappingsFileName"
Export 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 Export-UserAndGroupMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyUserAndGroupMappingsFileName"
Syntax
Export-UserAndGroupMapping -MappingSettings [-Path] [-Overwrite]
Parameters
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | True |
Position? | 0 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Overwrite <SwitchParameter>
Specifies that file will be overwritten if already exist.
Required? | False |
Position? | 2 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Path <String>
Specifies the path where you want to save the file. If this argument is not specified, the path of the save mapping file will be the same as the location where you are running the PowerShell script.
Required? | False |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |
Inputs
MappingSettings <MappingSettings>
Outputs
The export result. <String>
Comments
0 comments
Please sign in to leave a comment.