SharePoint 2013 – How to Hide Taxonomy Columns

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

  1. Access the SharePoint server.
  2. Open PowerShell (preferably the IDE).
  3. Paste the code at the bottom of this article into the console and replace the variable values as required.
  4. Run the code which should hide the fields.
  5. 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()
Advertisement

One thought on “SharePoint 2013 – How to Hide Taxonomy Columns

  1. 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.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.