Is there a gentle way of stopping processes using Windows PowerShell?

Posted by Charles Anderson on Stack Overflow See other posts from Stack Overflow or by Charles Anderson
Published on 2010-04-27T16:24:58Z Indexed on 2010/04/27 16:53 UTC
Read the original article Hit count: 243

Filed under:

I have to stop a browser from a PowerShell script, which I do by piping it into

Stop-Process -Force

However, this is very abrupt. When the browser is restarted, it detects that it didn't shut down cleanly, and tries to restart the previous session. Is there some way I can tell it to shut itself down gracefully? ("There are two ways we can do this ...")

© Stack Overflow or respective owner

Related posts about powershell