locked
end all process and threads RRS feed

  • Question

  • On a Windows 10 1809 system I have opened up Winword 5 times.  so on my Taskbar when you hover over the Winword icon you'll see 5 different docs show up.   Running this command does not kill all 5, it only kills 1 instance of Winword

    Get-Process winword |   Foreach-Object { $_.CloseMainWindow() | Out-Null } | stop-process –force

    why?  How do I kill all running Winword instances regardless of how many are open?


    mqh7

    Tuesday, September 17, 2019 1:49 PM

Answers

  • use this and check

    Get-Process winword  | stop-process -force


    Regards SHISHIR KUSHAWAHA If this thread answered your question, please click on Mark as Answer.

    • Marked as answer by mqh7 Tuesday, September 17, 2019 2:25 PM
    Tuesday, September 17, 2019 2:17 PM

All replies

  • use this and check

    Get-Process winword  | stop-process -force


    Regards SHISHIR KUSHAWAHA If this thread answered your question, please click on Mark as Answer.

    • Marked as answer by mqh7 Tuesday, September 17, 2019 2:25 PM
    Tuesday, September 17, 2019 2:17 PM
  • yes, that closed all threads.   I don't understand why your code closed all Winword and mine, using a ForEach did not.   

    mqh7

    Tuesday, September 17, 2019 2:25 PM