SharePoint Online: How to Disable Quick Launch Bar using PowerShell?

Requirement: Hide Quick Launch Bar in SharePoint Online.

How to Hide Quick Launch in SharePoint Online?

The Quick Launch or left navigation located on the left side of the site typically contains links to resources located in the current site like lists and libraries, subsites, etc. To turn off the quick launch in SharePoint Online, Go to:

  • Site Settings >> Click on “Navigation Elements” under Look and Feel
  • Uncheck “Enable Quick Launch” and Click OK.
    sharepoint online disable quick launch bar

This removes quick launch in SharePoint Online.

SharePoint Online: How to hide left navigation using SharePoint Designer?

You can also hide the quick launch in SharePoint Online from SharePoint Designer. Just open the site in SharePoint designer and uncheck “Display Quick Launch” under settings and save!

hide quick launch in sharepoint online using sharepoint designer

SharePoint Online: Disable Quick Launch using PowerShell

Here is how to hide left navigation in SharePoint Online:

#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

#Config Variable

#Setup Credentials to connect
$Cred = Get-Credential
Try {
    #Setup the context
    $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
    $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)
    #Disable Quick Launch
    $Ctx.Web.QuickLaunchEnabled = $False
    Write-host -f Green "Quick Launch Bar Disabled Successfully!"
Catch {
    write-host -f Red "Error:" $_.Exception.Message

Hide quick launch using PnP PowerShell:

To hide the left navigation bar in SharePoint Online, use this PnP PowerShell:

#Config Variables
$SiteURL = ""

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)

#Get the Web
$Web = Get-PnPWeb

#hide left navigation bar in sharepoint online
$web.QuickLaunchEnabled = $False

Here is another approach: Hide SharePoint Online Quick Launch using CSS

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

Leave a Reply