Skip to content

Bart's Hideout

SharePoint, Personal and other stuff I want to share

  • Bouwen
  • ☆ Kobe ☆
  • Bram
    • Foto-album
  • SharePoint
  • Slacking
  • Foto’s
    • Foto album – Bouw
    • Foto album – Allerlei
  • Contact
  • About
    • Privacy Policy
  • Administration

Find all termsets used for site navigation

SharePoint 2013 gives you the ability to use termsets for navigation. When you use the UI (TermStore Management), you can enable a specific termset to be used for navigation by enabling the “Use this Term Set for Site Navigation” option on the INTENDED USE tab of the termset.

navigationProp

If you are used to work with PowerShell and I really encourage people to use PowerShell, you quickly notice that this option is not simply a property on the termset object which you can set to true or false.

The navigation settings are stored in custom properties on the termset. In order to change this setting or to find termsets which are used for site navigation, you need to look for a custom property with the name _Sys_Nav_IsNavigationTermSet.

The script below gives you an example on how you can find all termsets which have this option enabled.

if ((Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -EA SilentlyContinue) -eq $null)
{
  Add-PSSnapin Microsoft.SharePoint.PowerShell
}

$adminwebapp = Get-SPWebApplication -includecentraladministration | ? { $_.IsAdministrationWebApplication }
$caSite = Get-SPSite $adminwebapp.Url

$session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($caSite)
$termstores = $session.TermStores
foreach ($termstore in $termstores)
{
  $groups = $termstore.Groups
  foreach ($group in $groups)
  {
    $group.TermSets | ? {$_.CustomProperties["_Sys_Nav_IsNavigationTermSet"]}
  }
}

Share this:

  • Email
  • Tweet
  • More

Like this:

Like Loading...

Related

Published Tuesday, 28 January, 2014
Categorized as SharePoint Tagged Managed Metadata, Navigation, PowerShell, SharePoint, _Sys_Nav_IsNavigationTermSet

By Bart

Bart is a certified SharePoint consultant / architect at CTG Belgium NV with a broad professional experience in IT, a background in software development with a specialisation in Microsoft products and technologies and a solid knowledge and experience in Microsoft SharePoint Products and Technologies. He started as a COBOL developer on a mainframe environment and grew into software development for Windows platforms. Participated in projects varying from migrations of existing applications to development of Web applications and Windows applications. Became fascinated by the SharePoint 2007 platform and strongly believed in the added business value of this platform. Is since then fully committed to SharePoint and focuses on SharePoint implementations, migrations, integrations, design and coaching. Stays on top of new developments within the SharePoint technology stack and related technologies.

View all of Bart's posts.

Post navigation

Previous post

Fix variation labels with a wrong locale

Next post

Creating Managed & Crawled Properties using PowerShell

Social

  • View bart.kuppens’s profile on Facebook
  • View evilvjeken’s profile on Twitter
  • View bkuppens’s profile on LinkedIn
  • View bkuppens’s profile on GitHub

My Links

  • BIWUG
  • Microsoft 365 Roadmap
  • My PowerShell Repository
  • Nintex Community
  • Working @ CTG

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Recent Posts

  • List Lookup Control filtering in Nintex Forms not working
  • Being a consultant at CTG for 17,5 years…
  • The Importance of Completing Tasks in Workflows
  • Maintaining Nintex Workflow Progress Data
  • Cleaning Workflow History in SharePoint

Archives

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
Bart's Hideout
Proudly powered by WordPress.
 

Loading Comments...
 

    loading Cancel
    Post was not sent - check your email addresses!
    Email check failed, please try again
    Sorry, your blog cannot share posts by email.
    %d bloggers like this: