Starting today, I’m publishing my first article that will inaugurate a new serie of posts on how to install SharePoint 2010 by using PowerShell. This article will be available under a new section in my blog: The Special Edition.
Before going further with the PowerShell syntax to configureSharePoint 2010. I suggest to review two previous articles I wrote.
The following PowerShell Script allows to create the SharePoint 2010 Configuration Database and the Central Administration Content Database. Unlike the SharePoint Configuration Wizard, It is possible with this script to specify the name of these databases and thus avoid the horrifying GUID in the database name.
#-------------------------------------------------------------
#Loading SharePoint Powershell Snapin
#-------------------------------------------------------------
Start-Sleep 5
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if ($snapin -eq $null)
{
Write-Host "Loading SharePoint Powershell Snapin"
Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
#Set variables
$Credential = Get-Credential #Authentication Popup to Enter Farm Service Account Credential
$DatabaseServer = "smtlshpsql99" #SQL Server Name
$ConfigDatabaseName = "SHP_2010_DEV_Config_temp" #SharePoint Configuration Database Name
$AdminContentDatabaseName = "SHP_2010_DEV_Admin_Content_temp" #SharePoint Administration Content Database Name
$Passphrase = "test1234!" #Passphrase must be with a special character
$PassphraseConv = (ConvertTo-SecureString $Passphrase -AsPlainText -force)
$CentralAdminPort = 65000
New-SPConfigurationDatabase -DatabaseServer $DatabaseServer -DatabaseName $ConfigDatabaseName -AdministrationContentDatabaseName $AdminContentDatabaseName -Passphrase $PassphraseConv -farmCredentials $credential
New-SPCentralAdministration -Port $CentralAdminPort -WindowsAuthProvider "NTLM"
#Provisioning Central Admin
Install-SPApplicationContent
Initialize-SPResourceSecurity
Install-SPFeature -AllExistingFeature
Install-SPService |
The second line triggers the Windows Authentication Popup which allows to enter the Farm Service Account. The fourth line configure the Central Administration Web Application with the port 65000 and the NTLM Authentication Provider. I recommend to keep it that way. Using a specific port on Central Admin URL is much more easy to remember. As for the NTLM Authentication Provider, it is preferable to use NTLM instead of Kerberos for Central Administration.