Thu. Jun 16th, 2022


Copyright © 2015, June. Michael Pomfret

Connect to an existing Server Farm

You should replace the “<Server name>” with the correct windows server name.

You should replace the “<SharePoint Configuration DB>” with the correct SharePoint Configuration database name.

You should replace the “<YourPassPhase>” with the correct passphase.



Write-Host “SharePoint 2013 – Connect to an existing Server Farm…”

$DBServer = ‘<Server name>’

$ConfigDB = ‘<SharePoint Configuration DB>’

$PassPhrase = ‘<YourPassPhase>’

$SecPassPhrase = ConvertTo-SecureString $PassPhrase –AsPlaintext –Force

Write-Host ” – Enabling SP PowerShell cmdlets…”

If ((Get-PsSnapin |?{$_.Name -eq “Microsoft.SharePoint.PowerShell”})-eq $null)


Add-PsSnapin Microsoft.SharePoint.PowerShell | Out-Null


Start-SPAssignment -Global | Out-Null

Write-Host ” – Connecting to server farm…”

Connect-SPConfigurationDatabase -DatabaseServer $DBServer -DatabaseName $ConfigDB -Passphrase $SecPassPhrase

Write-Host ” – Installing Help Collection…”

Install-SPHelpCollection -All

Write-Host ” – Securing Resources…”


Write-Host ” – Installing Services…”


Write-Host ” – Installing Features…”

$Features = Install-SPFeature –AllExistingFeatures -Force

Write-Host ” – Installing Application Content…”


Stop-SPAssignment -Global | Out-Null

This website uses cookies. By continuing to use this site, you accept our use of cookies.