Microsoft SharePoint Foundation 2010 Installation – Part 3

This blog is a continuation from last weeks blog (Part 2). We’ll jump right in where we left off. Verify you are logged into the server that you want to install SharePoint on as the sp_Name_Install account. Right click the PowerShell ISE and select “Run as administrator”:

sp2010-install20.png

Load the SharePoint PowerShell Snap-in:

Add-PSSnapin Microsoft.SharePoint.PowerShell

sp2010-install21.png

You will receive “The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.” This is normal since we have not configured the farm yet.

We’ll be stepping through the same process that’s completed when you run the configuration wizard, except using PowerShell. This process is documented on TechNet.

$FarmCredential = Get-Credential -credential mikefrobbins\spExtranetFarm
$Passphrase = Read-Host -assecurestring "SP PassPhrase"
$DbName = "SP_Extranet_Config"
$DbServer = "sql.mikefrobbins.com"
$AdminContentDb = "SP_Extranet_AdminContent"
New-SPConfigurationDatabase -DatabaseName $DbName -DatabaseServer $DbServer -AdministrationContentDatabaseName $AdminContentDb -FarmCredentials $FarmCredential -Passphrase $Passphrase
Install-SPHelpCollection -All
Initialize-SPResourceSecurity
Install-SPService
Install-SPFeature -AllExistingFeatures
New-SPCentralAdministration -Port 45000 -WindowsAuthProvider "NTLM"
Install-SPApplicationContent

sp2010-install221.png

You’ll be prompted to enter the password for the sp_Name_Farm account:

sp2010-install23.png

You’ll also be prompted for a passphrase which is used to add additional SharePoint servers to your farm in the future:

sp2010-install24.png

It will take a few minutes for the script to complete. You’ll know it’s running by the run button being grayed out and the stop command being enabled. Do not interrupt the script.

sp2010-install25.png

When the script finishes, you’ll see output similar to this:

sp2010-install251.png

If you’re running SQL Denali CTP3, this initial configuration will fail since SharePoint 2010 (non-SP1) attempts to use a feature that is deprecated and has been removed in CTP3: New-SPConfigurationDatabase : Could not find stored procedure ‘sp_dboption’.

sp2010-install261.png

If you receive the error above which is documented on MSDN, drop the database that was created, load SP1 for SharePoint Foundation 2010 before preceding any further, and then re-run the script. If you have not installed SharePoint yet, you could slipstream SP1 into the SharePoint installation media and save yourself some time and trouble.

Register the sp_Name_Pool account as a SharePoint Managed Service Account:

$PoolCredential = Get-Credential -credential mikefrobbins\spExtranetPool
New-SPManagedAccountCredential $PoolCredential

sp2010-install27.png

From Internet Information Services Manager, stop the default website and set it to listen on a port other than 80, 443, and the port that is being used by the Central Admin website.

Create a Web Application and Site Collection:

$WebAppPool = "SP - Extranet"
$WebAppName = "SP - Extranet"
$WebAppPoolAcct = "mikefrobbins\spExtranetPool"
$WebAppDbName = "SP_Extranet_Content"
$WebAppDbServer = "sql.mikefrobbins.com"
$WebAppPath = "D:\inetpub\wwwroot\wss\VirtualDirectories\Extranet"
$WebAppPort = "80"
$SiteColUrl = ("https://extranet.mikefrobbins.com")
$SiteColOwner = "mikefrobbins\spExtranetFarm"
$SiteColDescription = "Mike F Robbins - Computing Solutions Extranet"
$SiteColName = "Extranet"
$SiteColTemplate = "STS#0"
New-SPWebApplication -ApplicationPool $WebAppPool -Name $WebAppName -ApplicationPoolAccount (Get-SPManagedAccount $WebAppPoolAcct) `
-DatabaseName $WebAppDbName -DatabaseServer $WebAppDbServer -Path $WebAppPath -Port $WebAppPort -Url $SiteColUrl
New-SPSite -Url $SiteColUrl -OwnerAlias $SiteColOwner -Description $SiteColDescription -Name $SiteColName -Template $SiteColTemplate

sp2010-install28.png

Set the appropriate DNS records. The sp_Name_Farm account is the only account that currently has access to your new SharePoint site. Welcome to your site!

sp2010-install29.png

Setup a SQL backup job for the SharePoint databases. Re-Run Windows Updates on the SharePoint server. Add additional web front end servers.

µ