- Adding a protocol used by SharePoint to call into the indexing connector
- Registering the indexing connector with SharePoint
Both steps are also described in the MSDN but we go one step further and automate it completely using PowerShell.
Adding protocol and handler to the registry
Based on the protocol of a content source's start address (e.g. http or bdc3) SharePoint decides which indexing connector should crawl it. The protocols known to SharePoint are stored in the Registry on the server where the crawling will take place.So, the protocol used by our indexing connector also needs to be added to the registry. The following script adds the protocol protocol1:
Function RegisterProtocolHandler { param ([string] $protocol) $path = "HKLM:\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ProtocolHandlers\" Write-Host "Adding protocol handler to registry: $protocol" # creates the property if not present, otherwise updates it Set-ItemProperty -path $path -name $protocol -value "OSearch14.ConnectorProtocolHandler.1" -ErrorAction Stop Write-Host -f Green "Successfully added protocol handler to registry: $protocol" } RegisterProtocolHandler -protocol "protocol1"If you look at the registry afterwards you will see your protocol among the already registered ones:
HKLM:\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ProtocolHandlers |
No comments:
Post a Comment