How to Get SharePoint Edition PowerShell?

PowerShell Script to get SharePoint Edition

In this article, we will explain How to get SharePoint Edition based on the product SKU ID and the farm build version using PowerShell.

You might also like to read SharePoint 2016 SKU: Get SharePoint Edition Using C#


Get SharePoint Edition PowerShell

Here, we are gonna list the corresponding get SharePoint editions based on the product SKU.

Note: the Stock Keeping Unit (SKU) is a unique set of characters identification code for a particular product/service. Read more at SKU.)

The SharePoint 2016 SKU

  • 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.

Detect SharePoint 2016 Edition using PowerShell

To run the below script, you should first make sure that the current user has sufficient privilege to run PowerShell Script in SharePoint, or you can use the farm account to run this script.

$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
}

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:

The SharePoint 2016 SKU

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

Get SharePoint Edition PowerShell

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


Detect SharePoint Edition using PowerShell

The above example is used to get SharePoint Edition PowerShell for SharePoint 2016, below we will provide a full complete script to get SharePoint Edition PowerShell for SharePoint 2016, 2013, and 2010 based on the Product SKU.

Steps

  • Download the full script from GitHub at Get SharePoint Edition PowerShell.
  • Make sure that the current user has sufficient privilege to run PowerShell Script
  • Run ISE as Administrator.
  • Open the downloaded script, then click Run.
How to Get SharePoint Edition PowerShell?
  • Based on the current installed SharePoint, you will get the current SharePoint Edition and the build version as shown below:
Detect the Installed Edition of SharePoint 2016 2013 2010
Get SharePoint Edition PowerShell

Conclusion

In conclusion, we have learned how to get the current SharePoint Edition and the farm build version using PowerShell.

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

Download the full PowerShell Script from GitHub at PowerShell Script to Detect the Installed SharePoint Edition.

See Also

3 thoughts on “How to Get SharePoint Edition PowerShell?”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top