Forum Discussion

Silas_Muth's avatar
Silas_Muth
Brass Contributor
Nov 05, 2020
Solved

SharePoint Online search all pages

Hello together,
I want to set up my SharePoint Online site so that the search will search all SharePoint sites and not just "this site".
Can anyone help me here?

Thank you very much and kind regards
Silas Muth

  • Silas_Muth's avatar
    Silas_Muth
    Nov 09, 2020

    MarekSkalinski 

    I have found exactly one PowerShell command that fixes this problem.

    #Set Parameters

    $SiteURL = "https://crescent.sharepoint.com/sites/Marketing"

     

    #Connect to SharePoint Online site

    Connect-PnPOnline -Url $SiteURL -UseWebLogin

     

    #change default search scope

    Set-PnPSearchSettings -SearchScope Tenant

     

2 Replies

  • MarekSkalinski's avatar
    MarekSkalinski
    Copper Contributor

    Silas_Muth By default you can use search which is located under https://yourtenant.sharepoint.com/_layouts/15/sharepoint.aspx

    also you can connect sites under the hub site and the search trough of them

     

    The third  way is to build search page under one site collection and use PNP Modern Search solution
    https://github.com/microsoft-search/pnp-modern-search

     

    • Silas_Muth's avatar
      Silas_Muth
      Brass Contributor

      MarekSkalinski 

      I have found exactly one PowerShell command that fixes this problem.

      #Set Parameters

      $SiteURL = "https://crescent.sharepoint.com/sites/Marketing"

       

      #Connect to SharePoint Online site

      Connect-PnPOnline -Url $SiteURL -UseWebLogin

       

      #change default search scope

      Set-PnPSearchSettings -SearchScope Tenant