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

Tuesday, 28 January, 2014Thursday, 30 January, 2014Bart

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.

Get site navigation termsets
PowerShell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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

SharePoint Managed Metadata, Navigation, PowerShell, SharePoint, _Sys_Nav_IsNavigationTermSet

Post navigation

← Fix variation labels with a wrong locale
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
  • My PowerShell Repository
  • SharePoint 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
Proudly powered by WordPress | Theme: Radiate by ThemeGrill.
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: