Blog

Counting the Servers in Your SharePoint Farm (License Sizing)

Raphael Meng

Web part licenses are sold per farm tier - Dev Server, Small Farm or Multi Server. The server count decides the tier; one line of PowerShell lists them all.

Amrein web part licenses are sold per SharePoint farm, and the tier is determined by the farm’s size. Before ordering, you therefore need one number: how many servers are joined to the farm? The most reliable way of finding out is to let SharePoint itself answer.

The one-liner

Open the SharePoint Management Shell on any farm server and type:

Get-SPFarm | Select -Expand Servers | Select Name, Status

The result is one row per server – for example:

Name            Status
----            ------
SPWFE01         Online
SPWFE02         Online
SPAPP01         Online

What actually happens

The three parts of the one-liner, from the inside out:

  1. Get-SPFarm – returns the farm object (Microsoft.SharePoint.Administration.SPFarm) resolved via the configuration database the server is joined to.
  2. Select -Expand ServersSelect is the built-in alias of Select-Object, and -Expand Servers (short for -ExpandProperty Servers) unwraps the farm’s Servers collection into one object per server. Without -Expand you would just see the collection printed as a single type name.
  3. Select Name, Status – keeps the two properties that matter: the server name and its status (Online or Offline).

Need just the number?

For the license form you usually only want the count:

# Total servers joined to the farm
(Get-SPFarm).Servers.Count

# Equivalent, as its own cmdlet
(Get-SPServer).Count

# Only servers currently online
@((Get-SPFarm).Servers | Where-Object { $_.Status -eq 'Online' }).Count

That number is what places your farm into one of the license tiers described in the next section.

From server count to license tier

Our Licenses & Prices page offers three farm-size tiers:

  • Dev Server – a single-server farm with the SharePoint front end and SQL Server on one machine; the typical development or test farm.
  • Small Farm – a two-server farm with a dedicated SQL Server and a separate SharePoint front-end server.
  • Multi Server – farms of three or more servers, from full three-tier topologies up to farms with multiple front ends.

The order form asks for your Farm ID – the first 8 hex characters of the farm GUID, also shown in the web part’s evaluation banner (see our post on getting the SharePoint farm GUID) – plus the tier name. The signed key is bound to the farm and unlocks the web parts on all servers the tier covers.

Note: count every server the one-liner returns – offline servers remain joined to the farm and still count. Remove decommissioned servers from the farm (PSConfig with the UNINSTALL action) before ordering, so they do not inflate the tier.
Note: both one-liners only read farm metadata from the configuration database – like Get-SPFarm itself, they require no elevated rights and can run on any farm server.
Verified: on our three-server SharePoint 2019 reference farm, both one-liners list exactly three servers – the same value Central Administration shows under “Servers in this farm”.
Bloch Engineering · SharePoint Support · Commands must be reviewed before execution in production.