Skip to main content

Import-SensitivityLabelMapping

PowerShell cmdlet reference for Import-SensitivityLabelMapping.

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

Command

Import-SensitivityLabelMapping

Description

The command to import the sensitivity label mappings from a file.

Examples

Import mappings from file

$mappingSettings = Import-SensitivityLabelMapping -Path C:\MyMappings\MySensitivityLabelMappingsFileName.sgslm
$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)

Merge mappings with mappings from file

$mappingSettings = Set-SensitivityLabelMapping -Source "ParentSL \ ChildLabel1" -Destination "ParentDestSL \ ChildDestLabel1"
$mappingSettings

# Example output:
# PropertyMappings :
# ContentTypeMappings :
# UserAndGroupMappings :
# PermissionLevelMappings :
# SiteTemplateMappings :
# SensitivityLabelMappings : ParentSL \ ChildLabel1 -> ParentDestSL \ ChildDestLabel1

$mappingSettings = Import-SensitivityLabelMapping -MappingSettings $mappingSettings -Path C:\MyMappings\MySensitivityLabelMappingsFileName.sgslm
$mappingSettings

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

Syntax

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

Parameters

-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

-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

None

Did this answer your question?