Microsoft Secure Tech Accelerator
Apr 03 2024, 07:00 AM - 11:00 AM (PDT)
Microsoft Tech Community
SOLVED

updating documents with AIP label through PowerShell

Iron Contributor

We are currently migrating data from a file share into Office365. As part of this process we would like to apply an AIP label to documents being migrated. Is there a way of doing this programmatically using PowerShell?

2 Replies
best response confirmed by Dhiran Gajjar (Iron Contributor)
Solution
Hi Dhiran, you can use Set-AIPFileLabel if you know what labels you're applying to each file. But caution as there seems to be an issue with the cmdlet.

@Haniel Croitoru - Thank you for that. 

 

As you mention that there are some issues with it, for me I couldn't make it work when I was trying to connect to a SharePoint online path. So I created a sync to my local laptop and use that as the path name but it looks like it can only update office files. I had some text files in there and it gave an error when parsing through these set of files. 

 

But at least you have given me some ideas. 

1 best response

Accepted Solutions
best response confirmed by Dhiran Gajjar (Iron Contributor)
Solution
Hi Dhiran, you can use Set-AIPFileLabel if you know what labels you're applying to each file. But caution as there seems to be an issue with the cmdlet.

View solution in original post