Share via

Sensitivity label

Engineer 0 Reputation points
2026-03-04T02:59:44.51+00:00

If I publish and applied a sensitivity label on a file. How can I remove this specific label from all the existing file which already applied by the label.

Microsoft Security | Microsoft Purview
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 81,300 Reputation points MVP Volunteer Moderator
    2026-03-04T03:07:52.7033333+00:00

    Try using the Set-AIPFileLabel by setting the label ID to "None". For example, to remove a label from all files in a local folder:

    # Import the AIP module and connect
    Import-Module AzureInformationProtection
    Connect-AipService
    
    # Set the folder containing files
    $FolderPath = "C:\SyncedFiles"
    
    # Recursively remove the label from all files
    $Files = Get-ChildItem -Path $FolderPath -Recurse -File
    foreach ($File in $Files) {
        Set-AIPFileLabel -Path $File.FullName -LabelId "None" -JustificationMessage "Removing label"
    }
    

    More at https://learn.microsoft.com/en-us/answers/questions/1700276/remove-microsoft-information-protection-label-from


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.