Enable and Disable App Bar in SharePoint Online
This script helps SharePoint Users to Enable or Disable App Bar Across SharePoint sites
Summary
This script sample demonstrates how to enable and disable the App Bar on SharePoint online sites by utilizing PnP PowerShell and SPO Management Shell.

# SharePoint online admin center URL
$siteUrl = "https://contoso-admin.sharepoint.com/"
# Connect to SharePoint online admin center
Connect-PnPOnline -Url $siteUrl -Interactive
# Set Temporarily Disable App Bar to True in order to disable
Set-PnPTemporarilyDisableAppBar $true
# Set Temporarily Disable App Bar to False in order to enable
Set-PnPTemporarilyDisableAppBar $false
# Disconnect SharePoint online connection
Disconnect-PnPOnline
# SharePoint online admin center URL
$siteUrl = "https://contoso-admin.sharepoint.com/"
# Connect to SharePoint online admin center
Connect-SPOService -Url $siteUrl
# Set Temporarily Disable App Bar to True in order to disable
Set-SPOTemporarilyDisableAppBar $true
# Set Temporarily Disable App Bar to False in order to enable
Set-SPOTemporarilyDisableAppBar $false
# Disconnect SharePoint online connection
Disconnect-SPOService
Contributors
| Author |
|---|
| Aman Panjwani |
| Ganesh Sanap |
Disclaimer
THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
Tool documentation & references
- Want to learn more about PnP PowerShell and the cmdlets
Check out the PnP PowerShell site to get started and for the reference to the cmdlets.
- Introduction to the SharePoint Online Management Shell
Check out the SPO Management Shell documentation site to get started and for the reference to the cmdlets.