Getting to know SCOM agent patch version

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

image

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

image

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 Smile

Advertisements

4 thoughts on “Getting to know SCOM agent patch version

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s