Share via


Get-FileSensitivityLabelInfo

Extracts and displays the sensitivity label related information attached to an office file stored in SharePoint.

Syntax

Default (Default)

Get-FileSensitivityLabelInfo
    [-FileUrl] <String>
    [<CommonParameters>]

Description

The Get-FileSensitivityLabelInfo cmdlet runs on a single office online file. If the file has a sensitivity label attached then it returns the id, displayname, isProtectionEnabled flag and id of the parent label (if applicable). You must be a SharePoint Online administrator to run the GetFileSensitivityLabelInfo cmdlet. Note that this cmdlet does not work on files that have labels with custom permission or user defined permission or double key encryption. For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at Intro to SharePoint Online Management Shell.

Examples

EXAMPLE 1

 Get-FileSensitivityLabelInfo -FileUrl "https://contoso.com/sites/Marketing/Shared Documents/Doc1.docx"

Parameters

-FileUrl

Applicable: SharePoint Online

Full URL for the file.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object