Forum Discussion
Home Sites and Microsoft Search
- Feb 11, 2020Ok. So ignore this. Apparently no matter what you do, once you set a site as a HomeSite it locks in the Search scope and cannot be changed via this override method. So you can change hub searches, but HomeSite designation cannot be changed from what I can tell.
My understanding is when setting the home site it changes the search scope to organization. But it’s an easy PowerShell flag to set the search scope on a site which you can just set the search scope back to hub only. I’m 'think' this could work, if you have a test setup you could run it on first. Or give me a few hours and I’ll confirm on my test tenant home site but I don’t see why it wouldn’t!
Here are instructions. Set scope to 0 should put scope back to a hub scope (default)
To change this setting:
1. Start PowerShell in administrator mode as you will be installing the PnP extensions.
2. Run the following commands to in this order:
PS C:\WINDOWS\system32> Install-Module SharePointPnPPowerShellOnline
# If you previously had installed this module, you may need to use the "-Force" parameter to install the newer version.
PS C:\WINDOWS\system32> Connect-PnPOnline -Url https://contosodemosg.sharepoint.com/sites/Strategy -UseWebLogin
# this will prompt you to sign into your site. Use the site owner credentials to sign in
PS C:\WINDOWS\system32> $web = Get-PnPWeb
PS C:\WINDOWS\system32> $web.SearchScope = 1
# 1 for Tenant, 0 for default behavior
PS C:\WINDOWS\system32> $web.Update()
PS C:\WINDOWS\system32> Invoke-PnPQuery