Skip to main content

Export-SensitivityLabelMapping

PowerShell cmdlet reference for Export-SensitivityLabelMapping.

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

Command

Export-SensitivityLabelMapping

Description

The command to export the sensitivity label to a file.

Examples

Export custom mappings

$mappingSettings = Set-SensitivityLabelMapping -Source "SourceSLParentLabel \ SourceSLChildLabel" -Destination "DestinationSLParentLabel \ DestinationSLChildLabel"
Export-SensitivityLabelMapping -MappingSettings $mappingSettings -Path C:\MyMappings\MySensitivityLabelsMappingsFileName

# Example output:
# The sensitivity label mappings exported with success to: C:\MyMappings\MySensitivityLabelsMappingsFileName.sgslm

Export mappings from a source site and a 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
Export-SensitivityLabelMapping -MappingSettings $mappingSettings -Path C:\MyMappings\MySensitivityLabelSiteMappings

# Example output:
# The sensitivity label site mappings exported with success to: C:\MyMappings\MySensitivityLabelsSiteMappings.sgslm

Syntax

Export-SensitivityLabelMapping
-MappingSettings <MappingSettings>
[-Path <String>]
[-Overwrite <SwitchParameter>]

Parameters

-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

-Overwrite <SwitchParameter>

Specifies that file will be overwritten if already exist.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

-Path <String>

Specifies the path where you want to save the file.

Required?

False

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

Parameter set name

(All)

Aliases

None

Did this answer your question?