1

I Have a bunch of site collections in SharePoint online and I want them to have the same top navigation links. Is it possible to configure this in some way that they inherit the navigation form the root site collection? If yes is it possible to configure the top link navigation of the root site collection using Powershell in SharPoint online?

The other idea I had is to configure the top link navigation of every site collection separately. Is this possible using Powershell? I know it is possible in SharePoint 2013 how ever using SharePoint online seems to work a bit different.

1

For site collections to have the navigation from the root site collection set $spWebNavigation.UseShared = $true as shown below :

 # get the site collection
 $spSite = Get-SPOSite -Identity "http://sitecollection"
        # loop through all the webs in the site collection
 foreach ($spWeb in $spSite.AllWebs)
  {
    # check if root web as this one doesn't obviously inherit
     if (!$spWeb.IsRootWeb)
     {
        # grab a Navigation object
        $spWebNavigation = $spWeb.Navigation
        # change to true
        $spWebNavigation.UseShared = $true
     }

     $spWeb.Dispose()
   }

   $spSite.Dispose()
  • And follow these steps to use PowerShell Online:technet.microsoft.com/en-gb/library/fp161372(v=office.15).aspx – Nk SP Aug 11 '14 at 8:45
  • Thank you for the reply. What does $spSite.AllWebs do? Does it get all the sub sites? This does not give my anything if I called it in Powershell using a sit collection with one sub site. It also does not exist in the auto completion of ISE. I am using the Powershell according to the instructions above. do I have to load something in to Powershell beforehand to make the script work? – user3297993 Aug 11 '14 at 9:21
  • Also the problem is that I am trying to have the same navigation as the root site collection on different site collection not for sub sites inheriting from the root site. – user3297993 Aug 11 '14 at 9:34
  • you are using sharepoint online management shell ? – priyanka gupta Aug 11 '14 at 9:48
  • yes, using SharePoint online management shell – user3297993 Aug 11 '14 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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