We are monitoring a specific windows service on a server using Sitescope remote monitoring. The sitescope system uses a WMI method to Check if the service on a specific server is up or not. Initially it works like a charm but over time the WMI connections from sitescope time out and we have been told that Sitescope is not closing the WMI connection it opens gracefully and the open connections pile up.
I am looking for a way to list open WMI connections to a specific service and/or server from a remote system and a way to kill those connections via a scheduled PowerShell (or batch/perl) script. I was able to list specific classes by -list parameter
of the Get-WmiObject cmdlet
but am unable to determine which class will give me the information that I require and the method to kill those connections.