I am building the navigation for a hub site in SharePoint Online using PowerShell and I want some of my links to be headers only (not URL).

I am using the following Powershell commands to create my navigation nodes:

To create a menu item with a hyperlink I use: Add-PnPNavigationNode -Title "Menu 1" -Url "" -Location TopNavigationBar

I am trying to create one without a link (so just a header) and I tried:

Add-PnPNavigationNode -Title "Menu 2" -Url "" -Location TopNavigationBar -Parent 123 # empty Url paramter

Add-PnPNavigationNode -Title "Menu 2" -Location TopNavigationBar -Parent 123 # no Url parameter

Both options are creating a menu item with a link to the hub home page.

Note that if I edit the links through the UI I can change it from URL to Header.

Any idea how I can create a Header item in the top navigation?


  • I've did multiple tries and the cmdlt seems buggy as hell. Seems to be some problems reported on github related to it. github.com/SharePoint/PnP-PowerShell/… – Christoffer Sep 27 '19 at 14:58
  • Yeah, tried all the option available. it seems previously they have option to add header but currently every Navigation node need to be added as link. may be you need to raise as userVoice or github forum – vinit kumar Sep 27 '19 at 15:28

Don't know if you're still facing this problem with but I had the exact same issue and found a solution. Set the header node's URL to "http://linkless.header/"

Try using the commandlet as such

Add-PnPNavigationNode -Title "Header" -Location "TopNavigationBar" -Url "http://linkless.header/"

  • Yes, this is exactly what I ended up doing. – user2261784 Jun 25 '20 at 6:47

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.