Placeholder text is the text that appears in the search box before user starts typing into it. The placeholder text may help your users about what to expect from search if you’ve configured a custom results page or changed behavior of search in other ways.
By default SharePoint online site hasSearch this siteas default placeholder text in the search box at the top of your page. This is a very generic placeholder text & sometimes you may want to change this placeholder text to something more specific or relevant to current site or site collection.
You can change the placeholder text in the search box for a specific (sub) site or an entire site collection using PnP PowerShell. Follow below steps to change the placeholder text in the search box:
Install/Update PnP PowerShell module:
You can run the following command to install the PnP PowerShell cmdlets:
Install-Module -Name "PnP.PowerShell"
If you have previously installed the PnP PowerShell module, you can run the following command to update it:
Update-Module -Name "PnP.PowerShell"
Connect to SharePoint site:
You can connect to a SharePoint site using below PnP PowerShell command (use administrative account):