How can i kill all non admin tasks in windows 10 using powershell?
Well so basically my laptop uses too much power so i always tend to close all tabs manually (except system and admin ones) is there any way to do this by a powershell command or something similar
2 Antworten
![](https://images.gutefrage.net/media/user/daCypher/1444744777_nmmslarge.jpg?v=1444744777000)
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.
![](https://images.gutefrage.net/media/user/TechPech1984/1632773764038_nmmslarge__12_0_519_519_b8bdbc8023c4e7722d66db9f2af2d5fd.png?v=1632773764000)
usually
https://www.windows-commandline.com/powershell-kill-process/
as long as you know what to kill
and with
you should find the owner of processes
![](https://images.gutefrage.net/media/user/TechPech1984/1632773764038_nmmslarge__12_0_519_519_b8bdbc8023c4e7722d66db9f2af2d5fd.png?v=1632773764000)
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 .
![](https://images.gutefrage.net/media/user/Error418/1661941897491_nmmslarge__0_0_1024_1024_3ee6d102f9fff3b8eb89a9336cca61ab.png?v=1661941898000)
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)