Get Sharepoint Version

using powershell again


Add-PSSnapin Microsoft.SharePoint.PowerShell;

$guids = (Get-SPFarm).Products;

$products = @{};
$products['35466B1A-B17B-4DFB-A703-F74E2A1F5F5E'] = 'Project Server 2013';
$products['BC7BAF08-4D97-462C-8411-341052402E71'] = 'Project Server 2013 Preview';
$products['C5D855EE-F32B-4A1C-97A8-F0A28CE02F9C'] = 'SharePoint Server 2013';
$products['CBF97833-C73A-4BAF-9ED3-D47B3CFF51BE'] = 'SharePoint Server 2013 Preview';
$products['B7D84C2B-0754-49E4-B7BE-7EE321DCE0A9'] = 'SharePoint Server 2013 Enterprise';
$products['298A586A-E3C1-42F0-AFE0-4BCFDC2E7CD0'] = 'SharePoint Server 2013 Enterprise Preview';
$products['D6B57A0D-AE69-4A3E-B031-1F993EE52EDC'] = 'Microsoft Office Web Apps Server 2013';
$products['9FF54EBC-8C12-47D7-854F-3865D4BE8118'] = 'SharePoint Foundation 2013';

foreach($guid in $guids) {
$products[$guid.ToString().ToUpper()];
# $guid.ToString().ToUpper();
}

Results look like:

SharePoint Foundation 2013
SharePoint Server 2013 Enterprise