Share via


How to sync taxonomy hidden list using PowerShell.

Taxonomy hidden list gets synced by timer job however there may be scenario when we may have to update the taxonomy hidden list manually. 

 

One way to manually update the taxonomy hidden list is using PowerShell script. To update the taxonomy hidden list, we need to call the SyncHiddenList method of TaxonomySession. SyncHiddenList  is static method and takes SPSite as object.

 

Sample PowerShell -

Get-SPWebApplication $siteUrl | Get-SPSite -limit ALL | foreach { 
            [Microsoft.SharePoint.Taxonomy.TaxonomySession]::SyncHiddenList($_)         

 }

 Above code sync all Taxonomy hidden list in all the site collection in specified web application.

 If you want to sync taxonomy hidden list on specific site collection you can run-

[Microsoft.SharePoint.Taxonomy.TaxonomySession]::SyncHiddenList($siteCollectionObject)