Search scopes are often created to refine the results returned on SharePont Search. I’ve written this small snippet of PowerShell as an easy way to get a report on all Scopes. I decided not to embelish it, and keep it quick and (not too) dirty, here goes:
$a = Get-SPEnterpriseSearchServiceApplication #grabs Content and Query
$scopes = $a | Get-SPEnterpriseSearchQueryScope
foreach ($Scope in $scopes)
{
write-host $Scope.name
write-host "=======================";
$scope.Rules #outputs all the rules
}
Want to talk?
Drop us a line. We are here to answer your questions 24*7.