Param ([string]$sspURL, [string]$sal1)
$description =@'
configures the default content source - deletes all start addresses and then adds portal start address and sets incremental crawl schedule
'@
#Edit default content source to replace it with $Sal1 then and set incremental crawl schedule to 5PM every weekday
#####################################################################
[System.Reflection.Assembly]::Load("Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
[System.Reflection.Assembly]::Load("Microsoft.Sharepoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
[System.Reflection.Assembly]::Load("Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
#####################################################################
### e.g. $sspURL = http://breakfast/ssp/admin
$site = new-object Microsoft.SharePoint.SPSite($sspURL)
### getting spsite from $Url
$searchContext = [Microsoft.Office.Server.Search.Administration.SearchContext]::GetContext($site)
### getting searchContext from spsite
$content = new-object Microsoft.Office.Server.Search.Administration.Content($searchContext)
### getting admin content from searchContext
###Initialize a new instance of the Content class.
$df = "local office SharePoint server sites"
$ContentSourceCollection = $content.ContentSources
$local = $ContentSourceCollection[$df]
$sac = $local.startaddresses
$sac.clear();
### e.g. $sal1 = http://test2.com/
$sac.add($sal1)
#####################################################################
$ContentSourceCollection = $content.ContentSources
$local = $ContentSourceCollection[$df]
#set context
$dailyIncrementalSchedule = new-object Microsoft.Office.Server.Search.Administration.WeeklySchedule($searchContext)
#set start hour
$hour = 17
$dailyIncrementalSchedule.starthour = $hour
$local.incrementalcrawlschedule = $dailyincrementalschedule
$local.Update();
#set weekly schedule
$dailyIncrementalSchedule.DaysOfWeek = [Microsoft.Office.Server.Search.Administration.DaysOfWeek]::Weekdays
$local.incrementalcrawlschedule = $dailyincrementalschedule
$local.update()
#####################################################################
Subscribe to:
Post Comments (Atom)
SharePoint Information Architecture Diagram
Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...
-
Introduction This document is intended to highlight possible causes of poor indexing performance on SharePoint 2007 farms as well as p...
-
SharePoint 2010 Remote BLOB Storage (RBS) Contents Differences between LOCAL and REMOTE FILESTREAM Providers . 3 EBS . 4...
-
Installing the SharePoint Management Packs to SCOM Contents Introduction Steps Raise a change! Download the MP Import the Ma...
No comments:
Post a Comment