param([string]$ContentSourceName="Local SharePoint sites") Add-PSSnapin Microsoft.SharePoint.PowerShell –ErrorAction SilentlyContinue # (Get-SPEnterpriseSearchServiceApplication).reset($true, $true) # full reset #Get Search service application $ssa = Get-SPEnterpriseSearchServiceApplication #Content Source Name Write-Host "reset indexes of : $($ContentSourceName)" #Get the content source $ContentSource = Get-SPEnterpriseSearchCrawlContentSource -Identity $ContentSourceName -SearchApplication $SSA #Get Each Start Address $StartAddresses = $ContentSource.StartAddresses | ForEach-Object { $_.OriginalString } #Clear Indexed content starts with custom contnet source $ContentSource.StartAddresses.Clear() #Re-add the start address to content source ForEach ($Address in $StartAddresses ){ $ContentSource.StartAddresses.Add($Address) }