Skip to main content
Save Permission Level Mapping
Updated this week

Command

Save-PermissionLevelMapping

Description

The command to save all the permission level mappings for a specific source and destination site.

Index

Examples

Save custom mappings for a source list and a destination list

$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"
$mappingSettings = Get-PermissionLevelMapping -SourceSite $srcSite -DestinationSite $dstSite 
$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    :  
$mappingSettings = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source "My Custom Permission" -Destination "Full Control" 
$mappingSettings = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source Read -Ignore 
$mappingSettings = Save-PermissionLevelMapping -MappingSettings $mappingSettings -SourceSite $srcSite -DestinationSite $dstSite 
$mappingSettings = Get-PermissionLevelMapping -SourceSite $srcSite -DestinationSite $dstSite 
$mappingSettings  
PropertyMappings        : 
ContentTypeMappings     : 
UserAndGroupMappings    : 
PermissionLevelMappings :  Approve              -> Approve
                           Contribute           -> Contribute
                           Design               -> Design
                           Full Control         -> Full Control
                           My Custom Permission -> Full Control
                           Read                 -> <NO DESTINATION>
                           View Only            -> View Only 
SiteTemplateMappings    :

Syntax

Save-PermissionLevelMapping-MappingSettings <MappingSettings> 
-SourceSite <Site> 
-DestinationSite <Site>
Save-PermissionLevelMapping-MappingSettings <MappingSettings>
-FromFileSystem <SwitchParameter> 
-DestinationSite <Site>

Parameters

-DestinationSite <Site>

Specifies the destination site.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-FromFileSystem <SwitchParameter>

Specifies that the source is the file system.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

FileSystem

Aliases

None

-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

-SourceSite <Site>

Specifies the source site.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

Default

Aliases

None

Did this answer your question?