Saturday, April 30, 2016

Create Enterprise Search Center in SharePoint using PowerShell

How to Create Search Center Site Collection?
Creating search center is quite straight forward. Key it: Select "Enterprise Search Center" template while creating site collection / subsite to create search center in sharepoint 2013.

sharepoint 2013 how to create search center

SharePoint 2013: create enterprise search center using PowerShell:
This PowerShell script creates new web application and enterprise search center site collection.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Define Variables for Web Application Creation
$WebAppName = "Crescent Search Center"
$HostHeader = "search.crescent.com"
$WebAppURL = "http://" + $HostHeader
$WebAppPort = "80"
$ContentDBName = "Crescent_Search_Content"
$AppPoolName = "Crescent Search Web Application App Pool"
$AppPoolAccount = "Crescent\SP16_Pool"
$FarmAdminAccount = "Crescent\SP16_Farm"

#Authentication Provider
$AuthProvider = New-SPAuthenticationProvider

#Check if Managed account is registered already
Write-Host -ForegroundColor Yellow "Checking if the Managed Accounts already exists"
$AppPoolAccount = Get-SPManagedAccount -Identity $AppPoolAccount -ErrorAction SilentlyContinue
if ($AppPoolAccount -eq $null)
{
    Write-Host "Please Enter the password for the Service Account..."
    $AppPoolCredentials = Get-Credential $AppPoolAccount
    $AppPoolAccount = New-SPManagedAccount -Credential $AppPoolCredentials
}

#Create new Web Application
New-SPWebApplication -name $WebAppName -port $WebAppPort -hostheader $HostHeader -URL $WebAppURL -ApplicationPool $AppPoolName -ApplicationPoolAccount (Get-SPManagedAccount $AppPoolAccount) -AuthenticationMethod NTLM -AuthenticationProvider $AuthProvider -DatabaseName $ContentDBName

#Create Enterprise Search Center site collection
New-SPSite -Name $WebAppName -Url $WebAppURL -Template "SRCHCEN#0" -OwnerAlias $FarmAdminAccount -ContentDatabase $ContentDBName

Tags: sharepoint 2013 create search center site, create a search center sharepoint 2013, sharepoint 2013 create search center powershell, sharepoint powershell create enterprise search center, sharepoint 2013 create enterprise search center powershell



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!


You might also like:

Related Posts Plugin for WordPress, Blogger...