Ran the script, but it had no impact. Running the script in other environments work fine, but not for this site that uses this template: https://learn.microsoft.com/en-us/sharepoint/provision-neo-hub
How to Remove Search box
We have a Microsoft New Employee Onboarding site - https://learn.microsoft.com/en-us/sharepoint/provision-neo-hub
How can we remove the search
2 answers
Sort by: Newest
-
-
CaseyYang-MSFT 10,321 Reputation points
2021-10-18T02:19:07.827+00:00 Hi @Wolfe, Thomas ,
Do you want to remove the search box from top navigation bar?
You could use PnP PowerShell to hide the suite bar search box.
1.Hide the suite bar search box on all pages and sites in the site collection
Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Site
2.Hide the suite bar search box on all pages in the current site
Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Web
PnP PowerShell commands:
#Connect to SharePoint Online site Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/yoursite" -UseWebLogin #Hide Searchbox in the Navigation bar Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Web -Force
My test result:
For Reference: Set-PnPSearchSettings
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.