Hide the Search Box on SharePoint 2019 Modern Pages
Question details
The organization wants to hide the search box on SharePoint 2019 modern site pages because it does not use search.

- Product
- SharePoint Server 2019
- Device & OS
- not provided
- Scenario
- Administrators want to simplify modern site pages by removing the visible search box.
- Observed behavior
- The search box appears on modern site pages even though the organization does not use search.
Identify a nonproduction SharePoint 2019 modern site and confirm that you have the permissions needed to test site settings. Check which SharePoint PowerShell tools are installed and whether their documentation supports your server version.
Test whether a supported search-box setting is available
Investigate the SharePoint Online search-box command without assuming it works in SharePoint 2019.
The PnP PowerShell command Set-PnPSearchSettings can hide the search box in the navigation bar in SharePoint Online. Its availability and behavior on SharePoint Server 2019 are not established, so this is a compatibility check rather than a confirmed fix.
Hiding a search box is a display change; it does not necessarily disable search throughout the site.
In PowerShell, run Get-Command Set-PnPSearchSettings to see whether the command is available in your installed modules.
Run Get-Help Set-PnPSearchSettings -Full and consult the documentation for the installed module. Confirm that the module, command, connection method, and search-box setting support SharePoint Server 2019 before attempting a change.
If the documentation confirms support, connect to your nonproduction site using the module's documented connection method and follow its instructions for hiding the navigation-bar search box. Refresh a modern page and check whether the box is hidden.
If support is unclear or the test fails, search Microsoft Learn and the SharePoint community for SharePoint Server 2019 modern search-box guidance before changing the production site.

Work with Office files outside SharePoint using WPS Office
WPS Office is a free, lightweight alternative for editing Office files with a familiar interface and support for common Microsoft Office formats, making it easy to move document work between suites. It does not change SharePoint search settings.

Frequently Asked Questions
Can I use the SharePoint Online command on SharePoint 2019?
Compatibility is not confirmed. Check the installed module's documentation and run Get-Help Set-PnPSearchSettings -Full to verify SharePoint Server 2019 support before testing it on a nonproduction site.
Does hiding the search box disable SharePoint search?
Not necessarily. A setting that hides the navigation-bar search box changes its visibility; it should not be assumed to disable search elsewhere.
What if Set-PnPSearchSettings is not available?
Run Get-Command Set-PnPSearchSettings in PowerShell to check availability. If it is missing, consult the documentation for tools that support SharePoint Server 2019 rather than installing an Online-only module and assuming it will work.
Where can I find SharePoint 2019-specific help?
Search Microsoft Learn and the SharePoint community for guidance on the modern search box in SharePoint Server 2019, and test any proposed change on a nonproduction site first.




