Create “Task Kill” Application

by Jun 30, 2015

With just one pipeline command, PowerShell can open a list of running applications. You can then select one or more in the list (hold CTRL to select more than one), and PowerShell would kill the selected applications.

Get-Process | 
  Where-Object { $_.MainWindowHandle -ne 0 } |
  Select-Object -Property Name, Description, MainWindowTitle, Company, ID |
  Out-GridView -Title 'Choose Application to Kill' -PassThru |
  Stop-Process -WhatIf

Note how the code uses –WhatIf to only simulate the kill. Remove –WhatIf to actually kill applications.

Killing applications will stop the selected applications immediately. All unsaved data is lost.

Twitter This Tip! ReTweet this Tip!