NLV
NLV

Reputation: 21641

Identify SharePoint Foundation or SharePoint 2010

I've a SharePoint installation in my virtual machine. How do I find whether it is SharePoint Foundation or SharePoint 2010? I've run this command -

Get-SPFarm | Select BuildVersion

and it is giving me the build version as 14.0.4762.1000. How do I identify the version from that?

Upvotes: 2

Views: 8847

Answers (3)

Falco O
Falco O

Reputation: 179

For a customer project based on SharePoint 2013 we had the same problem. For this case we developed a simple Helper, which can be easily adapted for SharePoint 2010. More Informationen about the helper and how to use it can be found here:

http://msscorner.de/2014/06/11/identify-which-sharepoint-2013-edition-is-in-use/

If you wanna use this Helper for SharePoint 2010, you only have to change the SharePoint 2013 SKUs with the SharePoint 2010 SKUs, which are listed above.

I hope this will help you!

Upvotes: 0

NLV
NLV

Reputation: 21641

Okay, should have searched a bit longer. I found it here - https://sharepoint.stackexchange.com/questions/3886/how-to-detect-the-edition-of-sharepoint-2010-installed. We can verify a regedit key to identify the GUID which matches to a SharePoint edition.

Upvotes: 3

Ferdinand Prantl
Ferdinand Prantl

Reputation: 5709

There is a page on MSDN http://msdn.microsoft.com/en-us/library/ff721969.aspx using registry access to list installed SharePoint products. However, sometimes you don't have enough permissions to look to the registry, or you want to use SharePoint API only - not to depend on registry paths. (You may need this check in some code that you deploy with a SharePoint solution where the registry access could be an unnecessary requirement.)

Your link to stackexchange above points out also a way using the SPFarm.Products property in PowerShell. This would be a complete code to check the SharePoint Server release in C#:

// B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0 : SharePoint Server 2010 Standard Trial
// 3FDFBCC8-B3E4-4482-91FA-122C6432805C : SharePoint Server 2010 Standard
// 88BED06D-8C6B-4E62-AB01-546D6005FE97 : SharePoint Server 2010 Enterprise Trial
// D5595F62-449B-4061-B0B2-0CBAD410BB51 : SharePoint Server 2010 Enterprise
Guid[] serverGuids = { new Guid("B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0"), 
                       new Guid("3FDFBCC8-B3E4-4482-91FA-122C6432805C"), 
                       new Guid("88BED06D-8C6B-4E62-AB01-546D6005FE97"), 
                       new Guid("D5595F62-449B-4061-B0B2-0CBAD410BB51") };

// If a Server ID cannot be detected we are running on Foundation.
bool isServer =  SPFarm.Local.Products.Any(productGuid =>
                     serverGuids.Contains(productGuid));

--- Ferda

Upvotes: 2

Related Questions