Joining a Server to the Farm

Joining a server to the farm, how hard could that be?  Heck, it’s just a command…let’s have a look at how to do it, and what to do if things don’t go smoothly.

First, let’s get the passphrase into a secure string.  This is the object that is required for all things password-related.

$plaintextphrase="your password"

Beware of the need to escape special characters.  For example a password with “$” has to be represented as `$

$securepw = convertto-securestring -string $plaintextphrase -asplaintext -force
Connect-SPConfigurationDatabase -DatabaseServer "your DB server" -DatabaseName "SharePoint_2010_Farm" -Passphrase $securepw

If you have difficulty recalling your Passphrase, no worries!  Just set a new one:

Set-SPPassPhrase -PassPhrase $securepw -Confirm

If you are lucky, the new server will join the farm.  Now here’s where the pain can start.  I recently encountered an error stating that the farms did not have identical software.  After a very exhaustive comparison between servers, I found that the installed product inventory is stored in the Registry on the server.

To make sure that absolutely the same “Products” are installed (as SharePoint sees it) first, check the registry on the existing and the Server to be added. The SKUs in the following registry entry need to match 100%: HKEY_LOCAL_MACHINESOFTWAREMicrosoftShared ToolsWeb Server Extensions14.0WSSInstalledProducts (e.g. You will find a ‘926E4E17-087B-47D1-8BD7-91A394BC6196’ for Office Web Apps)

Get a list of which Products Sharepoint is actually aware of being installed. On the Server that is in the Farm, open up a Sharepoint Powershell, then run

Get-SPFarm | select Products

This returns an array of the GUIDs of installed production SKUs in Sharepoint.   This will allow you to compare what the candidate server has in its registry to what the farm believes is running.  If this does not match the list in the Registry, run the following:

Set-SPFarmConfig -installedproductsrefresh

This will “synchronize” the registry with the list of products in the farm.  Then re-run

Get-SPFarm | select Products

Check if all your installed products are now shown, you should be able to join your Server to the Farm.

Within the Farm database, the list of products can be viewed:

SELECT [Product], [Version], [PatchableUnit], [PatchableUnitName]
FROM [SharePoint_Config].[dbo].[ServerVersionInformation]