How to Remove Search box

Wolfe, Thomas 61 Reputation points
2021-10-15T23:33:20.097+00:00

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

How can we remove the search

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,561 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. 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?

    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.


  2. Wolfe, Thomas 61 Reputation points
    2021-10-21T23:20:49.68+00:00

    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