Tuesday, June 5, 2012

How to join a SharePoint server to an existing farm using PowerShell

$SQLServer = "myDatabaseServer"
$FarmPassPhrase = "myFarmPassPhrase"
$FarmConfigDatabase = "SP1_SharePoint_Config_DB"

$FarmPassphrase = (ConvertTo-SecureString $FarmPassPhrase -AsPlainText -force)
Connect-SPConfigurationDatabase -DatabaseServer $SQLServer  -DatabaseName $FarmConfigDatabase -Passphrase $FarmPassphrase

Initialize-SPResourceSecurity
Install-SPService
Install-SPFeature -AllExistingFeatures