What agents report to management server? (one-liner)

 

Just to show you there is almost always more than one way to solve a problem in the Command Shell. Some ways are just easier than others!

?I was looking at what apparently is one MS Internal?suggestion?for returning all the agents that report to a specific management server?Stefan posted today.??A function, 10 or 12 lines of code, a variable to accept the MS name, etc. Fair enough.?That totally works - but so does this one liner.

get-agent | where-object {$_.PrimaryManagementServerName -eq ‘Mgmt Svr FQDN’} | ft name

2 Responses to “What agents report to management server? (one-liner)”

  1. Ace DDL » What agents report to management server? Says:

    [...] Pete from SystemCenterForum mentiones that this will also work: get-agent | where-object {$_.PrimaryManagementServerName -eq ?Mgmt Svr FQDN?} | ft name [...]

  2. Stefan Stranger Says:

    Hi Pete,

    Your are completely right ;-)
    Regards,
    Stefan

Leave a Reply

privacy policy | terms of use | copyright © 2008 pete zerger