There are a a couple of ways to kill a process from the command prompt when running in Administrator mode:
- taskkill /IM "ProcessToKill.exe" /F
- PowerShell Stop-Process -Name "ProcessToKill.exe" -Force
But if the command prompt is not Administrator, you get an "Access is denied" error.
Can you force a target process to be killed regardless of how the script is launched (double-click, right-click "Run as administrator", etc.)?