I was recently tasked with finding out how to hide the taxonomy catchall columns that appear when Content & Structure is used to move items into a list or library. These type of fields can’t be hidden using the normal SharePoint interface meaning our next best option is to use PowerShell.
I’ll cover how to use PowerShell to hide this column down below.
How to Fix
- Access the SharePoint server.
- Open PowerShell (preferably the IDE).
- Paste the code at the bottom of this article into the console and replace the variable values as required.
- Run the code which should hide the fields.
- If you need to loop through all libraries or several libraries I’d suggest looking at my previous article – SharePoint – How to Modify SharePoint Lists and Libraries Using PowerShell
$ErrorActionPreference = 'silentlycontinue' Add-PSSnapin Microsoft.SharePoint.PowerShell $web = Get-SPWeb "*siteURL*" # Enter the full URL to the site containing the library $list = $web.Lists["*libraryName*"] # Enter the name of the library (The name as it shows in the URL) $fieldstoupdate = @("TaxKeywordTaxHTField", "Taxonomy Catch All Column") # Enter the name of the fields to hide if($list -ne $null) { foreach ($field in $fieldstoupdate) { $fieldname = $list.Fields["$field"] $fieldname.Hidden = $true $fieldname.update() Write-Host -f green "Updated field" + $fieldname } Write-host -f green $list.Title"on"$web.Name"site at URL"$web.Url"updated succesfully" } else { Write-Host -f red $listName "does not exist in the subsite"$web.Name", skipping" } $list.Update() $web.Dispose()
Thank you for sharing!
The solution did not work for me right away in SharePoint 2016. I had the problem that the “Taxonomy Catch All Column” field was also “sealed”, so I had to change this property first to getting the column updated.
Maybe someone has this issue too one day.
LikeLiked by 1 person