0

Hi Guys I need to kill all processes in a session but only from an user, not all.

Like user1, find all PIDs in them and print them like

120,451,487,455,... then exclude some I want for example I want 120 and 451 to not be killed but the rest yes.

I can do kill -9 PID this will kill the PID, but I am not sure how to kill all of them or find them from the user

XD Ink
  • 47
  • 1
  • 8
  • This looks to be same as https://stackoverflow.com/questions/6381229/how-to-kill-all-processes-matching-a-name – Vidya Sep 06 '17 at 11:39

1 Answers1

0

With PowerShell you can do whatever you want.Please visit the following web page.

https://technet.microsoft.com/en-us/library/ee177004.aspx

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-5.1

MahmutKarali
  • 339
  • 4
  • 8