SharePoint 2010 – get Search configuration over Powershell


today it’s time to play a bit with Powershell and focus on the SharePoint Search.

First of all, i want  to show you the whole world of cmdlets in SharePoint 2010. Therefore i was interested to count all Cmdlets which comes from SharePoint 2010, means these commands are included in the namespace Microsoft.SharePoint.Powershell:

get-command | where {$_.ModuleName –eq “Microsoft.SharePoint.Powershell”} | measure


As you can see, at the moment we have in the public beta (build 12.0.4514) 535 cmdlets. I think the count of cmdlets will increase and not decrease in future. So it’s necessary to get a good entry point into SharePoint Powershell world.

Lets get all command which include the name “search”:

get-command *search* | where {$_.CommandType –eq “Cmdlet”} | measure


The result show us 131 cmdlets which only include the word “search”. WOW

What’s about:





And as you know each cmdLet gives you and large list of members. E.g. get all member of the SharePoint Search Service Application:

get-SPEnterpriseSearchServiceApplication | get-member


An Example of a small list of display member:

Now lets go a bit into the deep:

List all Search Services on the farm:


List all Search Service Applications on the farm:


These commands are your entry point to get in contact with your Search Settings. Some Commands need the “Id” of the Search Service Application or Search Service Instance to get deeper settings.

Managing Search Topology

These nouns are available to manage the search topology in SharePoint 2010:

nouns cmdlets nouns starts with SPEnterpriseSeach*
Search Service Application SPEnterpriseSearchServiceApplication
e.g. Get-SPEnterpriseSearchServiceApplication,
Search Service Instance SPEnterpriseSearchServiceInstance
e.g. GET-SPEnterpriseSearchServiceInstance
Search Administration Component SPEnterpriseSearchAdministrationComponent
Search Property Database SPEnterpriseSearchPropertyDatabase
e.g. GET-SPEnterpriseSearchPropertyDatabase
Search Query Topology SPEnterpriseSearchQueryTopology
Search Query Component SPEnterpriseSearchQueryComponent
e.g. GET-SPEnterpriseSearchQueryComponent
Search Index Partition SPEnterpriseSearchIndexPartition
e.g. Get-SPEnterpriseSearchIndexPartition
Search Crawl Database SPEnterpriseSearchCrawlDatabase
e.g. GET-SPEnterpriseSearchCrawlDatabase
Search Crawl Topology SPEnterpriseSearchCrawlTopology
e.g. GET-SPEnterpriseSearchCrawlTopology
Search Crawl Component SPEnterpriseSearchCrawlComponent
e.g. GET-SPEnterpriseSearchCrawlComponent

Notice: The naming convention for Powershell include verbs and nouns in a structure like this: [VERB] – [NOUN]

In Sharepoint 2010 we have verbs like: GET, SET, REMOVE, INSTALL, UNINSTALL, NEW, ENABLE, DISABLE. ADD, START, STOP, MOVE, BACKUP, Export,Import,  …

So the table of search nouns i collect for you displays only a small subset of commands (e.g. the most known GET). For you it’s more important to have a look at the nouns to get a fast entry point..

Now lets play with these commands in detail:

  • combine SearchServiceApplication with SearchAdministrationComponent to get for each SearchServiceApplication the SearchAdministrationComponent information:

“GET-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchAdministrationComponent

  • combine SearchPropertyDatabase with SearchServiceApplication to get for each SearchServiceApplication the SearchPropertyDatabase information:

“GET-SPEnterpriseSearchServiceApplication | Get-SPEnterpriseSearchPropertyDatabase


  • combine SearchServiceApplication  with SearchQueryTopology:

“GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchQueryTopology


  • combine SearchServiceApplication  with the SearchQueryTopology and SearchQueryComponent:

“GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchQueryTopology | GET-SPEnterpriseSearchQueryComponent


  • combine SearchServiceApplication  with the SearchQueryTopology and SPEnterpriseSearchIndexPartition

“GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchQueryTopology | SPEnterpriseSearchIndexPartition


  • combine SearchServiceApplication  with the SPEnterpriseSearchCrawlDatabase

“GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchCrawlDatabase


  • combine SearchServiceApplication with SearchCrawlTopology:

“GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchCrawlTopology


  • combine SearchServiceApplication with SearchCrawlTopology and SearchCrawlComponent:

“GET-SPEnterpriseSearchServiceApplication | GET-SPEnterpriseSearchCrawlTopology | GET-SPEnterpriseSearchCrawlComponent


And at the end of the post we get a in touch with 10 search cmdlets of 535 SharePoint cmdlets, so only 525 left. 😉



Comments (0)