Kill a Process with Powershell only for the User session

HI, this is a command from PowerShell for killing a process only for the user session in place.

Get-Process -Name ‘EXCEL’ | where { $_.SessionId -eq ([System.Diagnostics.Process]::GetCurrentProcess().SessionId) } | Stop-Process -Force

1 Like