Which servers have an Operations Manager client?

Some time ago I got asked to write some PowerShell code to list all servers which have an Operations Manager agent installed.
So, how does one accomplish this?
The nice and proper way would be to query Add/Remove Programs, right?

Though I notices that some systems gave me an error. Mainly some Windows Server 2003 machines, but nevertheless I still wanted to list those too!
So, what would be a nice way to check this?
Well, what about going back to basics… test if the installation path exists 🙂

Alright. Now that I’ve got two ways of checking this I feel pretty save that servers existing in both lists don’t have the OpsMgr agent installed.

Servers that only exist in the output of Get-NoOpsMgrAgentPath would be older operating systems.
… and servers that only exist in the output of Get-NoOpsMgrAgent would be servers to take a look at and see what’s going on 🙂

5 comments

  1. Stefan Roth says:

    Hi Jeff

    This is true up to SCOM 2012 SP1 in SCOM 2012 R2 the agent name / directory changed to C:Program FilesMicrosoft Monitoring AgentAgent also in Add/Remove Programs

    the agent is named Microsoft Monitoring Agent btw. the Windows Service names changed also :).
    Cheers,
    Stefan

  2. Jeff Wouters says:

    Hi Stefan,
    Thanks for sharing, good information! 🙂
    Jeff.

Leave a Reply

Your email address will not be published. Required fields are marked *