This week I started again my SCOM lab, and wondered how to find out which patch version of SCOM I am running. I want simple and clean solution. First I found build numbers on this link https://buildnumbers.wordpress.com/scom/ . Later I also found in my scripts SQL query from some time ago. It query Operations Manager database to get patch version of agents.
select bme.path AS 'Agent Name', hs.patchlist AS 'Patch List' from MT_HealthService hs inner join BaseManagedEntity bme on hs.BaseManagedEntityId = bme.BaseManagedEntityId order by path
You will get list in this format
But we have Powershell now. Why bother with SQL. It is very easy to get to the command. I added some extras and this is outcome
get-scomagent | select HealthState, displayName, Version, Patchlist | sort-object -Property Displayname | ft Healthstate, displayName, Version, Patchlist -AutoSize
After you run it you will get nice list of scom agent list sorted by DisplayName
To get to know version of management server patch level procedure is a little bit more complicate. Please refer to this script example for UR7. https://jurelab.wordpress.com/2015/09/18/check-if-scom-2012-r2-infrastructure-was-upgraded-to-ur7-ps-script/
Jure is checking file versions, so script is different for every update rollup. I don’t like this script. If I write my own it will be better