509.949.2162 jeremy@bondbyte.com

//Provision Usage App
$UP = Get-SPServiceApplicationProxy | where {$_.TypeName -like “Usage*”}
$UP.Provision()

//Starts the Services
$hostA = Get-SPEnterpriseSearchServiceInstance -Identity “spapp”
Start-SPEnterpriseSearchServiceInstance -Identity $hostA

//Verify They’re started
Get-SPEnterpriseSearchServiceInstance -Identity $hostA

//Results
//Get-SPEnterpriseSearchServiceInstance -Identity $hostA
//TypeName : SharePoint Server Search
//Description : Index content and serve search queries
//Id : 82ce8815-ecbd-4cf3-a98e-33f20bd86039
//Server : SPServer Name=myserver1.example.com
//Service : SearchService Name=OSearch15
//Role : None
//Status : Online

//Returns Search Server Topology
$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -Active -SearchApplication $ssa
$active

//Results
//TopologyId : 2d7bb046-1ad4-43a9-9984-754c4551a3ec
//CreationDate : 1/25/2012 3:06:00 AM
//State : Active
//ComponentCount : 6

//Get Search Component Topology, where services and dbs are located and running. etc
$ssa = Get-SPEnterpriseSearchServiceApplication
$active = Get-SPEnterpriseSearchTopology -SearchApplication $ssa -Active
Get-SPEnterpriseSearchComponent -SearchTopology $active

//Results changed based on topology.
//ComponentId : 805274bf-0daa-4df8-9b67-02fa9b1b7d71
//TopologyId : 95aabd17-c9b2-4e95-a39c-ba34063786ef
//ServerId : 04f49e69-758e-4b9b-a981-1db64614b782
//Name : QueryProcessingComponent1
//ServerName : SP1

//ComponentId : b8c23e8b-d7d5-44cf-ac2d-1bdf227e35bb
//TopologyId : 95aabd17-c9b2-4e95-a39c-ba34063786ef
//ServerId : 04f49e69-758e-4b9b-a981-1db64614b782
//Name : AdminComponent1
//ServerName : SP1

//NumProcessingTasksInParallel : 4
//MaxSortMemoryInMB : 40
//ComponentId : c3a2f85c-712e-4ff0-9863-68b6bb3d0530
//TopologyId : 95aabd17-c9b2-4e95-a39c-ba34063786ef
//ServerId : 04f49e69-758e-4b9b-a981-1db64614b782
//Name : AnalyticsProcessingComponent1
//ServerName : SP1

//ComponentId : 8ded268e-76f0-4493-89f4-6ddbaccf95c8
//TopologyId : 95aabd17-c9b2-4e95-a39c-ba34063786ef
//ServerId : 04f49e69-758e-4b9b-a981-1db64614b782
//Name : ContentProcessingComponent1
//ServerName : SP1

//ComponentId : 42e34ded-34f5-422e-b60c-7355cecca3e9
//TopologyId : 95aabd17-c9b2-4e95-a39c-ba34063786ef
//ServerId : 04f49e69-758e-4b9b-a981-1db64614b782
//Name : CrawlComponent1
//ServerName : SP1

//IndexPartitionOrdinal : 0
//RootDirectory :
//ComponentId : 3559c289-8a9d-4131-89aa-f69b4869b7b2
//TopologyId : 95aabd17-c9b2-4e95-a39c-ba34063786ef
//ServerId : 04f49e69-758e-4b9b-a981-1db64614b782
//Name : IndexComponent1
//ServerName : SP1

//Stops the Services
$hostA = Get-SPEnterpriseSearchServiceInstance -Identity “spapp”
Stop-SPEnterpriseSearchServiceInstance -Identity $hostA