SearchURL not used within scripts

Jun 27, 2012 at 2:08 PM

Hi,

just wondering if this is by design. According to the xml documentation the switch SearchURL from within the site collection element is used to change the default search url, right? Within the powershell scripts I could not find any place where this is used. Any ideas?

Stefan

Jun 27, 2012 at 2:42 PM

this should do the trick - Function CreateWebApp

$SearchCenter = $SiteCollection.SearchUrl
if  ($SearchCenter)
    {
     $SearchResultURL = $SearchCenter + "Pages/results.aspx"
     Write-Host -ForegroundColor White " - Setting the Search Center  Connection for `"$SiteCollectionName`" to `"$SearchCenter`"..."
     $Site.RootWeb.AllProperties["SRCH_ENH_FTR_URL"] = $SearchCenter;
     $Site.RootWeb.AllProperties["SRCH_TRAGET_RESULTS_PAGE"] = $SearchResultURL;
    }

Coordinator
Jun 27, 2012 at 2:45 PM

That's right, it was something @andrewwoody added but it was never implemented in the main script. Your suggestion looks good, would you mind integrating it into AutoSPInstallerFunctions.ps1 and uploading as a patch for evaluation?

Thx
Brian

Jun 27, 2012 at 3:18 PM

done.

Stefan