Wednesday, 29 June 2016

Set All Search boxes to use the search center in SharePoint 2013


In SharePoint Site search boxes will crawl the data from local sites. We can see “Expand your search” link that redirects the search center, whenever we configure the global search center in the application. We can configure the search boxes in site level and site collection level in site settings (Site Settings -> Site Collection Administration -> Search Settings) Site level (Site Settings -> Search -> Search Settings)


















In SharePoint it is always not possible to modify in all the sites and site collections. Steve Mann wrote power shell commands to loop all the site collections and apply search center URL.

$webApp = Get-SPWebApplication “Web Application URL
foreach ($siteColl in $webApp.Sites)
{
    if ($siteColl -ne $null)
    {
        $site = Get-SPWeb $ siteColl.Url      
        $site.AllProperties["SRCH_SB_SET_SITE"] = 
                {"Inherit":false,"ResultsPageAddress":"/sites/SearchCenter/Pages/results.aspx","ShowNavigation":false}'
        $site.AllProperties["SRCH_ENH_FTR_URL_SITE"] = '/sites/SearchCenter/Pages'
        $site.Update();
    }
}

Here SRCH_SB_SET_SITESRCH_ENH_FTR_URL_SITE are properties. 
We can find about more in these links


We don't know what happened, but something went wrong. Could you please try that again?

I recently ran into an issue I hadn't seen before when configuring Excel Services on SharePoint
2013 RTM. I'd performed all the configuration steps described on TechNet.
 However, when I tried to browse to a workbook, I got the following error:


I checked the event logs and the trace logs, and the root of the problem was an 
Excel Services Application error with event ID 5226: Unable to create or access workbook cache.


This might seem like a straightforward permission issue. However, what also tends to happen in this
situation is that the IIS application pool will stop, and this error gets buried under many more generic errors.
(I've seen event IDs 5231, 5239 and 5240, for which the official advice is to restart the server.
Obviously in this case that isn't much help.)

The fix is straightforward - change the permissions on the %WINDIR%\Temp folder. 
As a managed account, the Excel Services application pool is a member of the 
local WSS_WPG security group, which has read and execute permissions on the 
Temp folder. Add the modify permission, recycle the application pool, 
and everything should work properly.

You could of course grant permissions on the Temp folder to the individual application pool account - in this case, I opted to grant permissions to the WSS_WPG group in case other managed accounts need to create temporary cache files.