Skip to main content
Export-PermissionLevelMapping

Export your permission level mappings as an SGRM file with PowerShell

Updated this week

Command

Export-PermissionLevelMapping

Description

The command to export the permission level mappings to a file.

Examples

Export custom mappings

# Set the permission level mapping for "Approve" -> "Full Control"
$mappingSettings = Set-PermissionLevelMapping -Source "Approve" -Destination "Full Control"

# Ignore the "Read" permission level
$mappingSettings = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source "Read" -Ignore

# Export the final permission level mappings to a local file
Export-PermissionLevelMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPermissionLevelMappingsFileName"

Export mappings from a source site and a destination site

# Connect to the source and destination sites
$srcSite = Connect-Site -Url http://myfarm1/sites/mysourcesite
$dstSite = Connect-Site -Url http://myfarm1/sites/mydestinationsite

# Retrieve the current permission level mappings
$mappingSettings = Get-PermissionLevelMapping -SourceSite $srcSite -DestinationSite $dstSite

# Export the retrieved mappings to a local file
Export-PermissionLevelMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPermissionLevelMappingsFileName"

Syntax

Export-PermissionLevelMapping-MappingSettings <MappingSettings> 
[-Path <String>] 
[-Overwrite <SwitchParameter>]

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 will be overwritten if it 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.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

PSPath

Did this answer your question?