SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been trying to find a cmdlet to do this but I havent been able to. I want to create a content source with a starting url, the problem is that url already exists on the default content source so I want to remove it from there. But I want to do it with powershell, any help is appreciated.

share|improve this question
up vote 5 down vote accepted

I would do it like this:

$searchServiceName = "Your Search Service Application"
$addressToMove = "http://your/start/address"
$defaultContentSourceName = "Local SharePoint sites"

$searchService = Get-SPEnterpriseSearchServiceApplication -Identity $searchServiceName

$defaultContentSource = Get-SPEnterpriseSearchCrawlContentSource -Identity $defaultContentSourceName -SearchApplication $searchService

if ($defaultContentSource.StartAddresses.Exists($addressToMove))

# then you can add $addressToMove to another content source

And I know this works, it is used as part of a deployment package for an application I'm working on, and has been tested and successfully deployed across several environments.

[Note: we use SharePoint Server 2010 / SharePoint Server Search, not Foundation or FAST, so I'm not sure how it would work in those cases, if that is your environment.]

share|improve this answer
I'd move the $defaultContentSource.Update() inside the IF. – Jussi Palo Sep 15 '15 at 8:46

You can achieve this using the next powershell snippet:

$sourceName = "File"

$contentSSA = "FASTContent"

$source = Get-SPEnterpriseSearchCrawlContentSource -Identity $sourceName -SearchApplication $contentSSA

$startaddresses = $source.StartAddresses | ForEach-Object { $_.OriginalString }


ForEach ($address in $startaddresses ){ $source.StartAddresses.Add($address) }


I tried it and it works.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.