Powershell

Run to close notepad:

powershell

Get-Process notepad | % { $_.CloseMainWindow() }