In Exchange, you may be running multiple versions like Exchange 2016 and 2019 or 2013 and 2016 and you need to get information about your build of Exchange, you can do so with a one liner command in the Exchange Management Shell that will give it to you:
- Get-ExchangeServer | Where {$_.AdminDisplayVersion -like “15.” -and $_.IsClientAccessServer} | Format-Table -AutoSize
The above will give you information on Exchange 2013 and upwards, if you want 2010 only then you can change “*15.*” to “*14.*”
Hope it helps.