Skip to main content
Import Permission Level Mapping
Updated this week

Command

Import-PermissionLevelMapping

Description

The command to import the permission level mappings from a file.

Index

Examples

Import mappings from file

$mappingSettings = Import-PermissionLevelMapping -Path "C:\MyMappings\MyPermissionLevelMappingsFileName.sgrm"
$mappingSettings  
PropertyMappings        : 
ContentTypeMappings     : 
UserAndGroupMappings    : 
PermissionLevelMappings : Approve              -> Approve
                          Contribute           -> Contribute
                          Design               -> Design
                          Full Control         -> Full Control
                          My Custom Permission -> <NO DESTINATION>
                          Read                 -> Read
                          View Only            -> View Only 
SiteTemplateMappings    :

Merge mappings with mappings from file

$mappingSettings = Set-PermissionLevelMapping -Source "My Custom Permission" -Destination "Full Control" 
$mappingSettings = Import-PermissionLevelMapping -MappingSettings $mappingSettings -Path "C:\MyMappings\MyPermissionLevelMappingsFileName.sgrm" 
$mappingSettings  
PropertyMappings        : 
ContentTypeMappings     : 
UserAndGroupMappings    : 
PermissionLevelMappings : Approve              -> Approve
                          Contribute           -> Contribute
                          Design               -> Design
                          Full Control         -> Full Control
                          My Custom Permission -> Full Control
                          Read                 -> Read
                          View Only            -> View Only 
SiteTemplateMappings    :

Syntax

Import-PermissionLevelMapping-Path <String> 
[-MappingSettings <MappingSettings>]

Parameters

-MappingSettings <MappingSettings>

Specifies the mapping settings. You can use this command to add multiple mapping settings to an existing mapping settings object. For more details, see Use multiple mapping files at once.

Required?

False

Default value

None

Accept pipeline input?

True (ByValue, ByPropertyName)

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-Path <String>

Specifies the file path that was previously exported with Sharegate.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

PSPath

Did this answer your question?