Currently I have it working for 2 levels of simple links. Actually no links are in this version. I have been able to create a submenu but not a sub-sub-menu. I believe it has to do with the way I access terms in the termset. I'm only about to get to the top terms in level 3.

How do I get all the terms so that I can match up guids and create a third-level?

enter image description here

SharePoint 2013 PowerShell Script

Instructions: Create a blank Publishing or Enterprize Wiki Site Collection Change $appendUrl = "http://intranet.contoso.com/sites/spbranding" to reflect the site you're in Run PowerShell from Admin (Assuming you have the Microsoft.SharePoint.PowerShell snapin loaded If you get a lot of errors - Go into Site Collection Navigation and change the Global to Structual Navigation and retry script. Once Script Runs successfully go back into Navigation and choose MetaData Global Navigation and select the correct Termset (Don't create a new TermSet) Atleast two levels of menus should appear.

  • 2
    What are you really asking here? Please try to focus less on "this can be awesome, cool cool script", and more on an actual problem you have in your script Commented Jan 15, 2014 at 15:13

1 Answer 1



foreach($term in $termSet.Terms)


foreach($term in $termSet.GetAllTerms()) 

This maybe documented somewhere--but what happens is that $termSet.Terms only goes through the first row and it will never find the matching guid and complete without creating the third level.

  • If this solved your problem, please mark it as your accepted answer (to put the question in a resolved state) Commented Jan 28, 2014 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.