plugin |
---|
add-to-gallery |
This script sample demonstrates how to enable and disable the App Bar on SharePoint online sites by utilizing PnP PowerShell and SPO Management Shell.
Note
You cannot disable the SharePoint app bar permanently. However, you can temporarily disable the SharePoint app bar in your tenant using below PowerShell scripts until March 31, 2023.
# 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
[!INCLUDE More about PnP PowerShell]
# 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
[!INCLUDE More about SPO Management Shell]
Author |
---|
Aman Panjwani |
Ganesh Sanap |
[!INCLUDE DISCLAIMER]