SharePoint Online Suite bar search box - Not hiding even after running OTB PS Script

%3CLINGO-SUB%20id%3D%22lingo-sub-2359976%22%20slang%3D%22en-US%22%3ESharePoint%20Online%20Suite%20bar%20search%20box%20-%20Not%20hiding%20even%20after%20running%20OTB%20PS%20Script%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359976%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20been%20trying%20to%20hide%20OOTB%20suite%20bar%20search%20box%20on%20site%20using%20Set-PnPSearchSettings%20in%20SPO%20Modern%20site.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-pnp%2Fset-pnpsearchsettings%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EReference%3A%20Set-PnPSearchSettings%20(PnP.Powershell)%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20using%20the%20below%20script.%3C%2FP%3E%3CP%3ESet-PnPSearchSettings%20-SearchBoxInNavBar%20Hidden%20-Scope%20Web%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EWhen%20we%20try%20to%20retrieve%20the%20search%20settings%2C%20we%20see%20the%20OOTB%20search%20is%20hidden.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%20class%3D%22TimelineItem%20pt-0%20js-comment-container%20js-socket-channel%20js-updatable-content%22%3E%3CDIV%20class%3D%22%20timeline-comment-group%20js-minimizable-comment-group%20js-targetable-element%20TimelineItem-body%20my-0%20%22%3E%3CDIV%20class%3D%22ml-n3%20timeline-comment%20unminimized-comment%20comment%20previewable-edit%20js-task-list-container%20js-comment%20timeline-comment--caret%22%3E%3CDIV%20class%3D%22edit-comment-hide%22%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CP%3EAlso%20we%20have%20noticed%20the%20below%20pattern%3A%3C%2FP%3E%3COL%3E%3CLI%3ESearch%20box%20seems%20to%20be%20visible%20for%20%22Article%22%20and%20%22SingleWebPartAppPage%22%20page%20layouts.%3C%2FLI%3E%3CLI%3EHowever%20it%20seems%20to%20hidden%20for%20%22Home%22%20page%20layout.%3CBR%20%2F%3EIs%20hiding%20the%20suite%20bar%20search%20box%20linked%20with%20any%20specific%20page%20layouts%3F%20Can%20you%20please%20let%20us%20know.%3C%2FLI%3E%3C%2FOL%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22js-timeline-item%20js-timeline-progressive-focus-container%22%3E%3CDIV%20class%3D%22TimelineItem%20js-targetable-element%22%3E%3CDIV%20class%3D%22TimelineItem-badge%20%22%3EThanks%20in%20advance.%3C%2FDIV%3E%3CDIV%20class%3D%22TimelineItem-badge%20%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22TimelineItem-badge%20%22%3EThanks%20%26amp%3B%20Regards%2C%3C%2FDIV%3E%3CDIV%20class%3D%22TimelineItem-badge%20%22%3EBhanu%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2359976%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ehybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Frequent Contributor

Hi Everyone,

 

We have been trying to hide OOTB suite bar search box on site using Set-PnPSearchSettings in SPO Modern site.

 

Reference: Set-PnPSearchSettings (PnP.Powershell) | Microsoft Docs

 

We are using the below script.

Set-PnPSearchSettings -SearchBoxInNavBar Hidden -Scope Web


When we try to retrieve the search settings, we see the OOTB search is hidden.

Also we have noticed the below pattern:

  1. Search box seems to be visible for "Article" and "SingleWebPartAppPage" page layouts.
  2. However it seems to hidden for "Home" page layout.
    Is hiding the suite bar search box linked with any specific page layouts? Can you please let us know.
 
Thanks in advance.
 
Thanks & Regards,
Bhanu

 

1 Reply
This is being accepted as a bug and will be fixed sooner by Microsoft.

https://github.com/pnp/powershell/issues/675

Thanks & Regards,
Bhanu