Detect the Installed SharePoint Edition Using PowerShell

In this article, I will explain

How to detect the installed SharePoint Edition Using PowerShell?


Prerequisites

Before you run this script, you should make sure that the current user has sufficient privilege to run PowerShell Script in SharePoint, Read more at Add-SPShellAdmin

Note: You can directly use the farm account to run this script.


Script Functions

There is a lot of articles talk about this topic, but the new here is detecting the SharePoint 2016 Edition based on the SKU ID.

To download the full PowerShell Script to Detect the Share Point Edition, check PowerShell Script to Detect the Installed SharePoint Edition 2016 / 2013 / 2010.


Below is the script to Detect SharePoint 2016 Edition via PowerShell.

$SharePointEditionGuid = (Get-SPFarm).Products
$SharePointEdition = switch ($SharePointEditionGuid)
{
5DB351B8-C548-4C3C-BFD1-82308C9A519B {"The Installed SharePoint Edition is SharePoint 2016 Trail Edition."; Break}
4F593424-7178-467A-B612-D02D85C56940 {"The Installed SharePoint Edition is SharePoint 2016 Standard Edition."; Break}
716578D2-2029-4FF2-8053-637391A7E683 {"The Installed SharePoint Edition is SharePoint 2016 Enterprise Edition."; Break}
}

if($SharePointEdition -eq $null)
{
Write-Host "The SharePoint Edition can't be determined." -ForegroundColor Red
}
else
{
Write-Host $SharePointEdition -ForegroundColor Yellow
Write-Host "The Build Version:" (Get-SPFarm).buildversion -ForegroundColor Yellow
}

Below the SKU ID for SharePoint 2016 Editions:

  • 5DB351B8-C548-4C3C-BFD1-82308C9A519B refers to SharePoint 2016 Trail.
  • 4F593424-7178-467A-B612-D02D85C56940 refers to SharePoint 2016 Standard.
  • 716578D2-2029-4FF2-8053-637391A7E683 refers to SharePoint 2016 Enterprise.

Script Output

This script has been tested on multiple SharePoint farms and showed good and accurate results.

(Test1) You have SharePoint 2016, The script will work properly and get the current SharePoint Edition and the farm build number as shown below:

(Test2) You don’t have SharePoint 2016, The script will inform you “The SharePoint Edition can’t be determined” as shown below:

Note: There is no SharePoint Foundation for SharePoint 2016, check the alternatives at SharePoint 2016 Foundation, What’s the alternative?


Applies To
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.
Download

To download the full PowerShell Script, check PowerShell Script to Detect the Installed SharePoint Edition.

Conclusion

In this article, we have explained How to detect the current installed SharePoint 2016 Edition and the Farm Build Number via PowerShell?

See Also
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s