Change the Placeholder text in SharePoint Search Box
Summary
This sample script shows how to change the placeholder text in SharePoint online search box for a given (sub) site and/or for all the sites in a site collection.
Scenario inspired from this blog post: SharePoint Online: How to change the placeholder text in the search box
# SharePoint site collection url
$siteUrl = "https://<tenant>.sharepoint.com/contoso"
# Connect to SharePoint Online site
Connect-PnPOnline -Url $siteUrl -Interactive
# Change the search box placeholder text for a given (sub) site
Set-PnPSearchSettings -Scope Web -SearchBoxPlaceholderText "Search Contoso Site"
# Change the search box placeholder text for all the sites in a site collection
Set-PnPSearchSettings -Scope Site -SearchBoxPlaceholderText "Search Contoso Site"
Check out the PnP PowerShell to learn more at: https://aka.ms/pnp/powershell
The way you login into PnP PowerShell has changed please read PnP Management Shell EntraID app is deleted : what should I do ?
Contributors
Author(s) |
---|
Ganesh Sanap |
Disclaimer
THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.