Skip to main content

Get-SensitivityLabelMapping

PowerShell cmdlet reference for Get-SensitivityLabelMapping.

Note: PowerShell integration requires a ShareGate Migrate Pro or Enterprise subscription. It is not available on the Essentials plan.

Command

Get-SensitivityLabelMapping

Description

The command to get the sensitivity label mappings from a source and destination, either being a site or a library.

Examples

Get mappings from a source and destination site

$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"
$mappingSettings = Get-SensitivityLabelMapping -SourceSite $srcSite -DestinationSite $dstSite
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings : <Default destination label> -> ParentDestSL \ ChildDestLabel1
# ParentSL \ ChildLabel1 -> ParentDestSL \ ChildDestLabel1
# ParentSL \ ChildLabel2 -> ParentDestSL \ ChildDestLabel2

Get mappings from a source and destination list

$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite"
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite"
$srcList = Get-List -Site $srcSite -Name MySourceListName
$dstList = Get-List -Site $srcSite -Name MyDestinationListName
$mappingSettings = Get-SensitivityLabelMapping -SourceList $srcList -DestinationList $dstList
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings : <Default destination label> -> ParentSLDestSL1 \ ChildSLDestLabel1 (Unrestricted)
# ParentSLSrcSL1 \ ChildSLSrcLabel1 (Unrestricted) -> ParentSLDestSL1 \ ChildSLDestLabel1 (Unrestricted)
# ParentSLSrcSL2 \ ChildSLSrcLabel2 (Unrestricted) -> ParentSLDestSL2 \ ChildSLDestLabel2 (Unrestricted)

Syntax

Get-SensitivityLabelMapping
-SourceSite <Site>
-DestinationSite <Site>
[-MappingSettings <MappingSettings>]

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

-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

-SourceSite <Site>

Specifies the source site.

Required?

True

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

Did this answer your question?