Command
Set-PermissionLevelMapping
Description
The command to add or update a permission level mapping in the mapping settings.
Index
Examples
Set custom mappings
$mappingSettings = Set-PermissionLevelMapping -Source "My Custom Permission" -Destination "Full Control" $mappingSettings = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source Read -Ignore $mappingSettings PropertyMappings : ContentTypeMappings : UserAndGroupMappings : PermissionLevelMappings : My Custom Permission -> Full Control Read -> <NO DESTINATION> SiteTemplateMappings :
Set custom mappings on existing mappings from 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 = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source "My Custom Permission" -Destination "Full Control" $mappingSettings = Set-PermissionLevelMapping -MappingSettings $mappingSettings -Source Read -Ignore $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
Set-PermissionLevelMapping -Source <String> -Destination <String> [-MappingSettings <MappingSettings>]
Set-PermissionLevelMapping-Source <String> -Ignore <SwitchParameter> [-MappingSettings <MappingSettings>]
Parameters
-Destination <String>
Specifies the destination permission level.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Default |
Aliases | None |
-Ignore <SwitchParameter>
Specifies to ignore the permission level.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | ExplicitIgnoreDestination |
Aliases | None |
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | False |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Source <String>
Specifies the source permission level.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |