Friday, 20 January 2012

SharePoint 2010 - Search Content Sources - Crawl Schedules - Server Names Mappings

SharePoint 2010 search is bit of a night mare, but you can simplify this with Powershell. Now one can disagree and say 'why we need to automate search with powershell, UI supports all configuration work'. Well Powershell will help to speed up this task and also one can use it in repetitive manner to re-produce similar configuration elsewhere without going through the hassle of UI all over again.

Search initial configuration involves, designing the topology to address performance, indexing, querying and storage of data(properties, craw logs etc.). I'll add another post to discuss this topic in more detail, This post is to cover some elements(content sources, crawl schedules, server names mappings) of search with the support of Powershell.

To configure Content Sources, you can either do it via UI or do it using Powershell. If you want to do it with Powershell then here is the command along with MSDN reference:


New-SPEnterpriseSearchCrawlContentSource
http://technet.microsoft.com/en-us/library/ff607867.aspx

The above command's parameters are quite straight forward and you can check reference for more detail. I'll only add something that is not present in the reference. I found, crawl schedule is not clearly defined. This is covered quite in depth under this link. You can see how the values for weekly and monthly crawl schedules need to be set in your command.

http://www.habaneros.com/mobile/blog/posts/Setting_crawl_schedules_with_PowerShell.aspx

To configure Crawl Rule use the following command:

New-SPEnterpriseSearchCrawlRule
http://technet.microsoft.com/en-us/library/ff608119.aspx


If you want to pass forms based authentication then this alone may not help. You might need UI assistance for final tweak.



To Configure Server Name Mappings use the following command:


New-SPEnterpriseSearchCrawlMapping
http://technet.microsoft.com/en-us/library/ff608116.aspx

There is no set exists against this. You will need to remove and then re-add to set the mappings.


Hope this helps !


Majid

No comments:

Iconise ‘Add Picture’ control in PowerApps

Default look you get for ‘Add Picture’ control is not very appealing for end user and there is no OTB way of specifying icon for this con...