I am new to Shell Script. I would like to write a script to generate new content source for search. I wrote the following code to create a content source.
$searchapp = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
New-SPEnterpriseSearchCrawlContentSource -SearchApplication $searchapp -Type SharePoint -name "SomeName" -StartAddresses "http://yoursite/subsite"
When I run the above script I am getting error like as follows
New-SPEnterpriseSearchCrawlContentSource : Only web applications can be specified when a Microsoft SharePoint Server content source is set to crawl web applications.
I would like to add a subsite in my startaddress.. how can i do that ? Any ideas ?