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. As a SharePoint Online user, you may have noticed that the left navigation bar is always displayed, regardless of which page you’re on. This can be helpful when you’re working with lists and libraries, but it can be annoying if you don’t need or want to use it, as it takes up valuable screen real estate. This article will show you how to disable the left navigation bar in SharePoint Online.

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.

Disable left navigation (or top navigation bar) in Modern SharePoint Online Sites

The modern navigation options also let you turn off navigation from SharePoint Online sites.

  • Login to your SharePoint Online site >> Click on the Settings gear
  • Click on “Change the Look” in the settings menu >> and then click on “Navigation” under “Change the look” pane.
  • Now, you can enable or disable the navigation by setting “Site Navigation visibility” switch.
  • Click on the “Save” button to commit your changes
sharepoint online turn off left navigation

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

You can also hide the quick launch in SharePoint Online from SharePoint Designer. Open the SharePoint designer site 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
$SiteURL="https://Crescent.sharepoint.com/sites/Marketing" 

#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
    $Ctx.Web.Update()
    $Ctx.ExecuteQuery()
    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 = "https://Crescent.sharepoint.com/sites/marketing"

#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
$web.Update()
Invoke-PnPQuery

Here is another approach to remove the left navigation with CSS: 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