Name
Export-PermissionLevelMapping
SYNTAX
Export-PermissionLevelMapping [-MappingSettings] <MappingSettings> [[-Path] <String>] [[-Overwrite] <SwitchParameter>]
DESCRIPTION
The command to export the permission level mappings to a file.
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.
Required? | False |
Position? | 1 |
Default value | |
Accept pipeline input? | false |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | PSPath |
INPUTS
MappingSettings
OUTPUTS
String
The export result.
EXAMPLES
-------------- Example: Export custom mappings --------------
$mappingSettings = Set-PermissionLevelMapping -Source "Approve" -Destination "Full Control" $mappingSettings = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source Read -Ignore Export-PermissionLevelMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPermissionLevelMappingsFileName"
-------------- Example: 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-PermissionLevelMapping -SourceSite $srcSite -DestinationSite $dstSite Export-PermissionLevelMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPermissionLevelMappingsFileName"