Forum Discussion

Haniel Croitoru's avatar
Haniel Croitoru
Learn Expert
Dec 09, 2020

Applying Sensitivity Labels to files prior to Migration

Hi all,

 

I'm in the process of migrating a client from a file share to Microsoft 365.  Part of the migration includes applying sensitivity labels.  So far, we did an inventory and know what labels should be applied to which file.

 

What is the best way to apply labels at such a granular level?  I tried using the Set-AIPFileLabel PowerShell cmdlet in a loop, but found it to be very unstable.  It crashes over 50% of the time, taking down the entire PowerShell session.  When it doesn't crash, it uses up a very large amount of memory that is not being released until the entire script ends.

 

Any feedback is much appreciated.

  • GlennDPC's avatar
    GlennDPC
    Copper Contributor
    I also have this problem!

    Doesn't matter how simple the implementation is.. simply calling this function causes a hardcrash of powershell ide or command line. as you said around 50% of the time.
    • Bill_Davis's avatar
      Bill_Davis
      Copper Contributor
      I also have this problem. Set-AIPFileLabel will crash a huge amount of the time either with a System.NullReferenceException: or sometimes even worse with a " System.AccessViolationException: Attempted to read or write protected memory."

      Using MCAS is not really an replacement for powershell.
      • StephenES's avatar
        StephenES
        Copper Contributor

        Bill_Davis

         

        Has anyone found anything from MS on this?

         

        We too are receiving these random crashes. Initially we thought it was due to some complex hash tables we used to reset labels.

         

        We made some minor mods but still randomly get these errors. 

         

        TRY/CATCH did not help. Any fixes found on your end?

Resources