Microsoft 365 – SharePoint online – hiding site title using PnP PowerShell

Microsoft 365 - SharePoint online communication site - navigating to Settings >> Change the look >> Header
Microsoft 365 - SharePoint online communication site - navigating to Settings >> Change the look >> Header

Hi All,

Greetings for the day!!!

Today learned new small SharePoint online site feature so sharing ! SHARING IS CARING 🙂

Learning – How to hide SharePoint online site title using UI (from Site) and PnP PowerShell Set-PnPWeb

Details / Background

  • In one of our project of SharePoint online – we have requirement of hiding site title
  • For single site we could easily do it from UI
  • But in our case we have prepared our custom site template and creating sites using our custom template
  • We were using PnP provisioning site template
  • Through PnP provisioning (from template XML file), I couldnt found the way to hide site title
  • Then found the PnP CMDLET – Set-PnPWeb

Steps to hide site title from UI

  • Navigate to the site on which we need to hide – Title
  • Here I am using my local development tenant – knowledgejunction1
  • I am demonstrating on root site
Microsoft 365 - SharePoint online communication site - Showing site Title
fig 1 : Microsoft 365 – SharePoint online communication site – Showing site Title – “spswapdemo”
  • From right top corner click on “gear” icon
  • Right pane “Settings” will appear as shown in below fig
  • Kindly please click on last link – “Change the look
Microsoft 365 - SharePoint online communication site - navigating to "Settings" to hide site title
fig 2 : Microsoft 365 – SharePoint online communication site – navigating to “Settings” to hide site title
  • As we click on “Change the look” link, “Change the look” pane from right side will open as shown in below fig
  • From “Change the look” pane we need to navigate on “Header” section
Microsoft 365 - SharePoint online communication site - navigating to Settings >> Change the look
fig 3 : Microsoft 365 – SharePoint online communication site – navigating to Settings >> Change the look
  • As we click on “Header” section, “Header” section pop-up will appear as
Microsoft 365 - SharePoint online communication site - navigating to Settings >> Change the look >> Header
fig 4 : Microsoft 365 – SharePoint online communication site – navigating to Settings >> Change the look >> Header
  • From “Header” section right pane, we have an option / setting / flag – “Site title visibility” as shown in above fig
  • Just turn off the flag and click on “Save” button
  • As in “Header” section we click on “Save” button, our site title will disappear as shown in below fig
Microsoft 365 - SharePoint online communication site - hiding site title
fig 5 : Microsoft 365 – SharePoint online communication site – hiding site title

Steps to hide site title using PnP PowerShell

  • As we have requirement to hide our communication site titles using PowerShell, we tried PnP PowerShell
  • There is PnP PowerShell CMDLET called – Set-PnPWeb having attribute –HideTitleInHeader
  • Connect to the site on which we need to hide – Title
  • We will use Connect-PnPOnline to connect the site

Connect-PnPOnline -Url https://knowledgejunction1.sharepoint.com

Microsoft 365 - SharePoint online - connecting to site using PnP PowerShell - Connect-PnPPOnline
fig 6 : Microsoft 365 – SharePoint online – connecting to site using PnP PowerShell – Connect-PnPPOnline

  • As we successfully connected to respective site, we will use “Set-PnPWeb” PnP PowerShell CMDLET to hide site title
  • We will use “-HideTitleInHeader” attribute of “Set-PnPWeb” CMDLET to hide site title

Set-PnPWeb -HideTitleInHeader

Microsoft 365 - SharePoint online - hiding the site Title using PnP PowerShell CMDLET - Set-PnPWeb with attribute - HideTitleInHeader
fig 7 : Microsoft 365 – SharePoint online – hiding the site Title using PnP PowerShell CMDLET – Set-PnPWeb with attribute – HideTitleInHeader

REFERENCES

https://github.com/pnp/powershell/blob/dev/documentation/Set-PnPWeb.md

Thanks for reading ! HAVE a FANTASTIC LEARNING 🙂 LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading