How to get server code using SharePoint Management Shell?
Solution:
Please login the SharePoint server which hosts the central administration, open the SharePoint Management Shell and run the following command line.
Add-Type -AssemblyName "SharePointBoost.License, Version=3.0.0.0, Culture=neutral, PublicKeyToken=15fd9ef9a2ec3a95"
[SharePointBoost.License.LicenseUtilityEx]::GetServerCode()
Then a server code will be returned as following.
Applies for: SharePoint 2019, SharePoint 2016, SharePoint 2013, SharePoint 2010