Hide the quick launch menu in SharePoint online – many times due to the business requirement, we want to hide the quick launch or left navigation from our SharePoint modern team site collection. In this tutorial, we will learn about how to hide or disable the quick launch menu from SharePoint online site using the PnP PowerShell and SharePoint site settings page.
Key-Highlights: Hide SharePoint Online quick launch menu
- Hide quick launch menu using the site navigation
- Hide quick launch menu using the PowerShell CSOM object model
- Hide quick launch menu using the PnP PowerShell
What is the quick launch menu in SharePoint Online?
A little brief about what the quick launch navigation menu is in SharePoint – a menu that is displayed in the left side panel of the site is called the quick launch menu. Please have a look at the below screen.

In the modern SharePoint, when we create a team site, the quick launch menu gets displayed automatically at the sidebar whereas when we create a communication site the quick launch menu does not display.
What is the advantage of hiding or disabling the quick launch menu in SharePoint?
The main advantage is, that we will get more space to display our content on the home page and we can add much more modern web parts to make our site better and nicer.
Let’s, start first, how we can hide or disable the quick launch menu in SharePoint using the Site settings page?
Steps to hide quick launch / left navigation / left menu / side navigation – SharePoint quick launch
Following the below site navigations we can hide the quick launch menu in SharePoint Online:

Step 1: Go to Site Settings
Click on the site gear icon.
Click on Site information

Click on the “View all site settings” link.

Click on the “Navigation Elements” link from the “Look and Feel” section of the “Site Settings” page.

Note:
- You can even directly, go to the site settings page by the below URL.
https://yoursiteURL/_layouts/15/settings.aspx
Un-check the “Enable Quick Launch” checkbox and click on the “Ok” button.

After disabling the “Enable Quick Launch” checkbox, and navigating to the site home page, we can see that the quick launch menu is hidden, now we can see the flat view of the site.

In the above steps, we have seen how we can hide the quick launch/left navigation / left menu/side navigation using the site UI, now we will learn how we can hide the quick launch using the PowerShell CSOM coding.
Hide quick launch menu using PowerShell
Using the PowerShell CSOM object model and PnP PowerShell we can hide the quick launch menu in SharePoint Online.
Hide quick launch / left navigation / left menu / side navigation using the PowerShell CSOM coding:
Using the below PowerShell coding, we can hide the quick launch/left navigation / left menu/side navigation:
############################Description####################################################### #The below script will disable the quick launch menu in SharePoint online team site. ############################################################################################## #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" cls $fileName = "Disable Quick Launh Menu" #'yyyyMMddhhmm yyyyMMdd $enddate = (Get-Date).tostring("yyyyMMddhhmmss") #$filename = $enddate + '_VMReport.doc' $logFileName = $fileName +"_"+ $enddate+"_Log.txt" $invocation = (Get-Variable MyInvocation).Value $directoryPath = Split-Path $invocation.MyCommand.Path $directoryPathForLog=$directoryPath+"\"+"LogFiles" if(!(Test-Path -path $directoryPathForLog)) { New-Item -ItemType directory -Path $directoryPathForLog #Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } #$logPath = $directoryPath + "\" + $logFileName $logPath = $directoryPathForLog + "\" + $logFileName $isLogFileCreated = $False #DLL location $directoryPathForDLL=$directoryPath+"\"+"Dependency Files" if(!(Test-Path -path $directoryPathForDLL)) { New-Item -ItemType directory -Path $directoryPathForDLL #Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } #DLL location $clientDLL=$directoryPathForDLL+"\"+"Microsoft.SharePoint.Client.dll" $clientDLLRuntime=$directoryPathForDLL+"\"+"Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path $clientDLL Add-Type -Path $clientDLLRuntime #File Download location $directoryPathForFileDownloadLocation=$directoryPath+"\"+"Downloaded Files" if(!(Test-Path -path $directoryPathForFileDownloadLocation)) { New-Item -ItemType directory -Path $directoryPathForFileDownloadLocation #Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } #File Download location function Write-Log([string]$logMsg) { if(!$isLogFileCreated){ Write-Host "Creating Log File..." if(!(Test-Path -path $directoryPath)) { Write-Host "Please Provide Proper Log Path" -ForegroundColor Red } else { $script:isLogFileCreated = $True Write-Host "Log File ($logFileName) Created..." [string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg) Add-Content -Path $logPath -Value $logMessage } } else { [string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg) Add-Content -Path $logPath -Value $logMessage } } #Parameters value $siteURL="https://globalsharepoint2020.sharepoint.com/sites/CustomSearchRND/" $userName = "Global-sharepoint2020@globalsharepoint2020.onmicrosoft.com" $password = "YourSPOPassword" $securePassword= $password | ConvertTo-SecureString -AsPlainText -Force Try { #Setup the Context $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteURL) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($userName, $securePassword) #Disable the Quick Launch Menu $ctx.Web.QuickLaunchEnabled = $False $ctx.Web.Update() $ctx.ExecuteQuery() Write-host -f Green "The quick launch menu has been disabled successfully!" } Catch { write-host -f Red "Error:" $_.Exception.Message }
Hide quick launch / left navigation / left menu / side navigation using the PnP PowerShell coding:
Using the below PnP PowerShell coding, we can hide the quick launch/left navigation / left menu/side navigation:
############################Description####################################################### #The below script will disable the quick launch menu in SharePoint online team site. ############################################################################################## CLS $siteURL="https://globalsharepoint2020.sharepoint.com/sites/CustomSearchRND/" $userName = "Global-sharepoint2020@globalsharepoint2020.onmicrosoft.com" $passWord = "YourSPOPassword" $encPassWord = convertto-securestring -String $passWord -AsPlainText -Force $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $userName, $encPassWord Connect-PnPOnline -Url $siteURL -Credentials $cred #Getting the site's Web object. $web = Get-PnPWeb #Disable the Quick Launch Menu $web.QuickLaunchEnabled = $False $web.Update() Invoke-PnPQuery
Quick launch menu hide technique will not work if the SharePoint Server Publishing Infrastructure feature is enabled in your site.
Summary: Hide quick launch in SharePoint online
Thus, in this article, we have learned the below concepts with respect to quick launch navigation in SharePoint online:
- Steps-by-step guide to hide quick launch/left navigation / left menu/side navigation.
- How to hide or disable SharePoint quick launch menu using the PnP PowerShell script?
- How to change menu items within SharePoint Online with the PnP command?
- How to disable a quick launch bar using PowerShell in SharePoint Online?
- How to hide or disable SharePoint quick launch menu using PowerShell?
See Also: SharePoint Online tutorial
You may also like the below SharePoint Online tutorials:
- Validate special characters in SharePoint list column
- Getting Error “InfoPath cannot generate a form template for the SharePoint list”
- How to auto populate field in InfoPath based on another field
- Add more than 5 conditions in InfoPath form’s rule
- How to validate the date column in Infopath form
- How to a copy list item to another list using SharePoint designer workflow
- Edit user Permission is greyed Out SharePoint Online
- Can not upload SharePoint App to SharePoint App Catalog
- Column header formatting in SharePoint list Quick Edit or Datasheet View
- Enable and configure information rights management (IRM) in SharePoint Online
- 25 quick checklists for SharePoint migration
- Create app catalog site in SharePoint online step by step
- Manage recycle bin in SharePoint Online – Office 365
- Plan and implement SharePoint site navigation

1 comments on “3 ways how to hide the quick launch menu in SharePoint online using PnP PowerShell?”