Remove-FileLabel cmdlet is getting stuck sometimes

Sundram Sontirkey 97 Reputation points
2024-06-27T06:47:00.7266667+00:00

Hi,

I have been exploring the new Microsoft Purview Infromation Protection PowerShell Module. I have been testing Remove-FileLabel cmdlet.

Remove-FileLabel -Path "C:\Users\user\Documents\sample" -JustificationMessage "Migration Requirement"

It's getting stuck sometime after when there is large file share around 10 K or more.

I want to understand why this error comes. Is there any limitation of this cmdlet.

Thanks!

Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
1,056 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,831 Reputation points
    2024-06-27T15:31:51.4433333+00:00

    Is "sample" a file or a folder?

    The example from the cmdlets' help shows the need for a trailing "\" if a local folder is used as the -Path parameter value.

    For example:

    If that doesn't help, try adding the "-Verbose" switch to the cmdlet. Keep in mind that verbose output is sent to a separate stream. If you don't run the command interactively, you'll have to redirect the verbose stream to some other stream. See here for examples: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-5.1

    Edit: I didn't notice that the text editor will remove a single "\" character in some cases unless it't typed as TWO backslash characters.

    0 comments No comments