IMPORTANT NOTE: There is a character which is used in the below script on more than one occasion, that doesn't show on this blog!!!!! This is the breaker character, which looks like an 'I' and is normally located next to the left shift key.
Essentially you will not be able to copy the below, its more of a reference piece.
###################
$app = new-spserviceapplicationpool –name "SERVERNAME Search Application" –account Rob-Hardy\Search
$searchapp = new-spenterprisesearchserviceapplication -name "SERVERNAME Search Service" -applicationpool $app
$proxy = new-spenterprisesearchserviceapplicationproxy -name "SERVERNAME Search Service" -Uri $searchapp.uri.absoluteURI
$proxy.status
#####IF THE PROXY IS OFFLINE ENTER THIS##### $proxy.status = “online”
#####IF THE PROXY IS OFFLINE ENTER THIS##### $changestatus.update()
$si = get-spenterprisesearchserviceinstance –local
$si.status
Start-SpEnterpriseSearchServiceInstance -identity $SI
set-spenterprisesearchadministrationcomponent –searchapplication $searchapp –searchserviceinstance $si
$ct = $searchapp new-spenterprisesearchcrawltopology
$csid = $SearchApp.CrawlStores select id
$CrawlStore = $SearchApp.CrawlStores.item($csid.id)
$hname = hostname
new-spenterprisesearchcrawlcomponent -crawltopology $ct -crawldatabase $Crawlstore -searchserviceinstance $hname
$ct set-spenterprisesearchcrawltopology -active
$qt = $searchapp new-spenterprisesearchquerytopology -partitions 1
$p1 = ($qt get-spenterprisesearchindexpartition)
new-spenterprisesearchquerycomponent -indexpartition $p1 -querytopology $qt -searchserviceinstance $si
$PSID = $SearchApp.PropertyStores Select id
$PropDB = $SearchApp.PropertyStores.Item($PSID.id)
$p1 set-spenterprisesearchindexpartition -PropertyDatabase $PropDB
$qt Set-SPEnterpriseSearchQueryTopology -Active
No comments:
Post a Comment