0

I know how to check if process or application is running on remote server with Powershell, but I have problem to check automatically if process has stopped working. In that case, process looks ok, but the application is not responding.

Is it possible to check this "feature" of applicaions made by our internal development team?;) Thank you

1
  • 2
    Did you have a look at the Responding property of class System.Diagnostics.process? Commented Mar 8, 2013 at 15:08

2 Answers 2

3

Using Get-Process against a remote machine works. There is a boolean property available called "Responding" that should work.

Sign up to request clarification or add additional context in comments.

4 Comments

Get-Process mmc -computername $ser | Where-Object {$_.Responding -eq $true} .... I've tried this, but it don't work. Can you please explain your solution? Thank you
if (Get-Process mmc -computername $ser | ? {!$_.Responding}){Write-Host Looks like an instance of this process is not responding}
That above snippet checks to see if there's an instance of that process where Responding is false. If so, it writes out. Good luck!
While (Get-Process mmc -computername $ser | ? {$_.Responding}) {Write-Host Everything's fine; sleep -seconds 5} ... this snippet should babysit the process and you can follow this snippet with some code to let you know the process is crashed.
1

Or

Get-WMIObject -Computername $computername -Class Win32_Process

2 Comments

I can't see any property of responding in the output of this script. Can you be more accurate?
I guess I didn't read the question very good. It looks like a responding and a non-responding process have to deal with what Handles they have Similar Question? Sorry for not reading your question in its entirety.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.