Add Top Link Bar Inheritance using PowerShell for SharePoint 2010

I would like to kick off the New Year with perhaps my shortest blog entry for 2012!

I had a client that created several subsites without selecting to use the same navigation as its parent. The decision was later made to add this back in order to provide some consistency throughout the environment. To easily resolve this, open up the SharePoint 2010 Management Shell and perform the following:

For one site:

$web = Get-SPWeb -Identity http://portal.company.com

$web.Navigation.UseShared = $true

For every site in the Site Collection:

Get-SPSite -Identity http://portal.company.com | Get-SPWeb -Limit All | %{$_.Navigation.UseShared=$true}

Yes, it’s THAT simple!

avatar

About Adam Preston

Adam is a Senior Consultant specializing in the administration and configuration of SharePoint. He holds several SharePoint certifications, including MCITP: SharePoint Administrator 2010. He is the Vice President of the Richmond SharePoint Users Group and active throughout the SharePoint community via Twitter (@_apreston) and MSDN Forums.
This entry was posted in Administration, PowerShell and tagged . Bookmark the permalink.

3 Responses to Add Top Link Bar Inheritance using PowerShell for SharePoint 2010

  1. Pingback: Add Top Link Bar Inheritance using PowerShell for SharePoint 2010 « SP2010 Blog

  2. avatar Michael says:

    Adam,

    Have you heard of any method to change the default Navigation Inheritance option from No to Yes when a user is creating a New Site?

    When you create a new Site, hit More Options, the Navigation Inheritance option is defaulted to No….we want to change that to Yes…

  3. Pingback: Add Top Link Bar Inheritance using PowerShell for SharePoint 2010 « SharePoint Adam

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>