Command
Export-UserAndGroupMapping
Description
The command to export the user and group mappings to a file.
Index
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 |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Overwrite <SwitchParameter>
Specifies the file that will be overwritten if already exists.
Required? | False |
Default value | None |
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 |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |