question

WolfeThomas-9499 avatar image
0 Votes"
WolfeThomas-9499 asked PremKolli-8162 edited

How to Remove Search box

We have a Microsoft New Employee Onboarding site - https://docs.microsoft.com/en-us/sharepoint/provision-neo-hub

How can we remove the search

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CaseyYangMSFT-4714 avatar image
0 Votes"
CaseyYangMSFT-4714 answered PremKolli-8162 edited

Hi @WolfeThomas-9499,

Do you want to remove the search box from top navigation bar?

141159-1.png

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:
141174-2.png

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.



1.png (8.0 KiB)
2.png (62.9 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @WolfeThomas-9499,

I'm checking how the things are going on about this issue. Is there any progress on this issue?

0 Votes 0 ·

@CaseyYangMSFT-4714 Is there any command that can hide the Top Search box for all the sites?
We are able to do for a single site by using the following command Set-PnPSearchSettings -Scope Web -SearchBoxInNavBar Hidden but it is happening for only that particular site.
Can someone please suggest how we can hide the SharePoint global search box for all sites?

0 Votes 0 ·
WolfeThomas-9499 avatar image
0 Votes"
WolfeThomas-9499 answered CaseyYangMSFT-4714 commented

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://docs.microsoft.com/en-us/sharepoint/provision-neo-hub

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @WolfeThomas-9499,

I will keep on this issue, if there is any update i will let you know.

0 Votes 0 ·