I want to do Taskkill
for all programs ending with exe
in a folder with cmd
/ powershell
Example
taskkill /f /im C:\folder\*.exe
In PowerShell, something like this:
$files = gci "C:\Path\To\Files" -Filter "*.exe"
foreach($file in $files){
Get-Process |
Where-Object {$_.Path -eq $file.FullName} |
Stop-Process -WhatIf
}
Remove the -WhatIf when you're confident that the correct processes would be stopped.