For Reference, here’s the two pieces of the one liner:
On the SCOM side, we need the class instance’s IsAvailable attribute and verify against that and the server name
$hs = “healthservice”; $MS = “scom-server.domain.com”; $cn = “$env:COMPUTERNAME.$env:USERDNSDOMAIN”; Get-SCClass -ComputerName $MS -name “…[Read more]
I’m having an issue of multiple personalities. I have a customer server that we monitor. I’d love to grab information from SCOM’s class instance to determine agent state (.IsAvailable), then based on that, issue stop/start service to the server.
The problem I’m having is that of credentials. I need one set for the SCOM query and another fo…[Read more]