You can determine which version of SharePoint is installed (2010 = 14, 2013 =15 ) with this line
(Get-PSSnapin Microsoft.SharePoint.PowerShell).Version.Major
You can determine which Build is Installed With this line
(get-spfarm).buildversion
To see the build number friendly names: