Forum Discussion
JSlei
Sep 14, 2021Brass Contributor
Apply sensitivity labels using PowerShell
Is it possible to apply sensitivity labels to documents in SharePoint (not sites or groups) using PowerShell?
- Sep 16, 2021There is no cmdlet to apply labels to individual files, afaik. Set-AIPFileLabel only works on local files. Using the MIP SDK is probably the way to go, at least until Microsoft introduces a cmdlet/Graph API endpoints.
Funnily enough we do have a cmdlet to remove labels: https://office365itpros.com/2021/03/25/decrypt-sharepoint-online-documents-graph/
JSlei
Sep 15, 2021Brass Contributor
still doesn't answer my question. I'm not looking to script the creation and maintenance of the labels, that's already been done. I'm looking to script the application of the labels to documents in SharePoint. Instead of the user having to label thousands of documents manually, is there a way to script it?
Sep 16, 2021
Perhaps this will solve your use case, as I don’t understand the current situation tbh.
With this update, all newly uploaded documents to a document library can “inherit” the configured label for the document library (if not already labeled).
https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=&searchterms=85621
With this update, all newly uploaded documents to a document library can “inherit” the configured label for the document library (if not already labeled).
https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=&searchterms=85621