Monday, January 6, 2014

Powershell script to Install SharePoint 2013

Ohhhhh Yessssss! I am back ....don't ask me after how long I am active on this SharePoint blog (sigh :(  its been almost 3 yrs... )....and the reason for this about - turn is my new year resolution (a deep secret, wouldn't tell you now ;) )... Yes , I am happy that I have straightened my back to continue with my skills and to catch up with the world. So here is my Powershell script that I used to successfully install SharePoint 2013 in POC environment:-

This script can be safely used to create a brand new SharePoint farm:-

PS C:\Users\ Spadmin > Add-PSSnapin Microsoft.SharePoint.Powershell -EA 0 

# Settings
PS C:\Users\ Spadmin  >$databaseServer = " "
PS C:\Users\ Spadmin  >$configDatabase = " "
PS C:\Users\ Spadmin >$adminContentDB = ""
PS C:\Users\ Spadmin  >$passphrase = " "
PS C:\Users\ Spadmin  >$farmAccountName = " "
PS C:\Users\ Spadmin >$farmAccount = Get-Credential $ S_SP2013_Dev_FARM
PS C:\Users\ Spadmin  >$passphrase = (ConvertTo-SecureString $passphrase -AsPlainText -force)

PS C:\Users\Spadmin > New-SPConfigurationDatabase -DatabaseServer $databaseServer -DatabaseName $configDatabase -AdministrationContentDatabaseName $adminContentDB  -Passphrase $passphrase -FarmCredentials $farmAccount

Please run the below command in SQL management studio to set the MAXDOP to 1 for parallel queries before creating a SharePoint farm:-
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE WITH OVERRIDE;
GO

EXEC sp_configure 'max degree of parallelism', 1;
RECONFIGURE WITH OVERRIDE;
GO

EXEC sp_configure;
GO

So, Apply the above recipe to create your very own SharePoint farm, and do let me know if this post was helpful.

Signing off..

Take care!!!!!!!!