Search and offline Availability in SharePoint 2010

In this article we will be seeing how to enable or disable search for a site in SharePoint 2010.

Site Managers have the ability to determine the level of visibility search and indexing have within the site and the availability of site content to offline clients. They also have the ability to determine if the site's web page's web parts should be included in searches.

Go to the Site Actions=> Site Settings => Site Administration => Search and offline availability.









We can manage the visibility of site and site's web page's web parts for search.


Using C# enable or disable search for a site



Using powershell enable or disable search for a site

#---------Enable Search

$site=Get-SPSite "http://servername:1111/" $web=$site.RootWeb; $web.AllowAutomaticASPXPageIndexing=$true $web.ASPXPageIndexMode=[Microsoft.SharePoint.WebASPXPageIndexMode]::Never $web.NoCrawl=$false $web.Update()

#---------DisableSearch

$site=Get-SPSite "http://servername:1111/" $web=$site.RootWeb; $web.AllowAutomaticASPXPageIndexing=$false $web.ASPXPageIndexMode=[Microsoft.SharePoint.WebASPXPageIndexMode]::Never $web.NoCrawl=$true $web.Update()