Remove Metadata from MMD Column with Powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-2233567%22%20slang%3D%22en-US%22%3ERemove%20Metadata%20from%20MMD%20Column%20with%20Powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2233567%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-subject-wrapper%20lia-component-subject%20lia-component-message-view-widget-subject-with-options%22%3E%3CDIV%20class%3D%22MessageSubject%22%3E%3CDIV%20class%3D%22MessageSubjectIcons%20%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22lia-message-body%20lia-component-message-view-widget-body%20lia-component-body-signature-highlight-escalation%20lia-component-message-view-widget-body-signature-highlight-escalation%22%3E%3CDIV%20class%3D%22lia-message-body-content%22%3E%3CP%3ETrying%20to%20remove%20a%20managed%20metadata%20value%20from%20a%20file%20via%20Powershell%20-%20there%20are%20a%20lot%20of%20resources%20online%20discussing%20PnP%20Powershell%20and%20how%20to%20manipulate%20metadata%2C%20that%20is%2C%20set%20metadata%2C%20edit%20metadata%2C%20and%20also%20creating%20a%20column%20default%20value%20from%20term%20store%20metadata.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20I%20have%20the%20situation%20that%20I%20need%20to%20%22remove%22%20metadata%2C%20and%20leave%20the%20file's%20particular%20column%20with%20an%20%22unassigned%22%20state%2C%20not%20the%20word%20%22Unassigned%22%20of%20course%2C%20but%20just%20EMPTY.%20Which%20is%20considered%2C%20%22unassigned%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you're%20interested%20in%20why%20I%20need%20this%2C%20it%20is%20because%20we%20wrote%20a%20powershell%20runbook%20that%20looks%20for%20moved%20files%20-%20then%20makes%20sure%20the%20metadata%20is%20correct.%20If%20the%20file%20was%20moved%20from%20a%20specific%20folder%20depth%20in%20the%20library%20to%20depth%20-%201%2C%20I%20have%20to%20set%20that%20deepest%20folder%20to%20%22unassigned%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%20working%20with%20a%20terrible%20workaround%2Fcludge-fix%20that%20uses%20a%20special%20metadata%20term%20%22_%22%20-%20ugly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2233567%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Automation%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Data%20Services%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor
 

Trying to remove a managed metadata value from a file via Powershell - there are a lot of resources online discussing PnP Powershell and how to manipulate metadata, that is, set metadata, edit metadata, and also creating a column default value from term store metadata.

 

However, I have the situation that I need to "remove" metadata, and leave the file's particular column with an "unassigned" state, not the word "Unassigned" of course, but just EMPTY. Which is considered, "unassigned".

 

If you're interested in why I need this, it is because we wrote a powershell runbook that looks for moved files - then makes sure the metadata is correct. If the file was moved from a specific folder depth in the library to depth - 1, I have to set that deepest folder to "unassigned".

 

Currently working with a terrible workaround/cludge-fix that uses a special metadata term "_" - ugly.

 

Please help

0 Replies