How can i kill all non admin tasks in windows 10 using powershell?

2 Antworten

Vom Fragesteller als hilfreich ausgezeichnet
get-process -IncludeUserName | where UserName -eq $env:USERDOMAIN\$env:USERNAME | Stop-Process

That stops every process which doesn't run as YOURDOMAIN\yourUserName

Maybe you want to add a more specific filter. You can also disable autorun processes in the task manager so they don't need to be stopped manually.

Error418 
Fragesteller
 31.08.2022, 11:47

My problem is i want to kill all tasks at once if possible as it would spare me so insanely much time (except system tasks)

1
TechPech1984  31.08.2022, 11:51
@Error418

it should be possible to iterate over takslist and kill processes in time . save it as powershell script and then run it . maybe you need to set rigth to execute it . google will help with it .

1