Forum Discussion

Helios Comms's avatar
Helios Comms
Iron Contributor
Nov 16, 2017

Web.Navigation.QuickLaunch not returning all links

I'm trying to write a PowerShell script that walks through all the navigation quick links in a list of sites. The script is shown below but at its heart it executes this line:

 

$QuickLaunch = $Web.Navigation.QuickLaunch

 

This returns a Microsoft.SharePoint.Client.NavigationNodeCollection object, i.e. a collection of nodes for each entry on the quick launch menu.

 

I then take this list and generate some HTML links but that's not important.

 

The problem is that the collection returned does not contain all the entries in the quick launch menu. Specifically, it appears to have any links to Office 365 groups missing, i.e. links to pages/classic SharePoint sites are there but nothing since my client started adding links to Office 365 groups.

I've updated my SPO DLLs to the very latest version - no difference. I also wondered whether it was because the admin account I'm using doesn't have access to the new projects by default so I ran another script to add the admin account as a member of all groups. Didn't make any difference either.

 

Bit stuck...

 

(Script to follow)

No RepliesBe the first to reply

Resources