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
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.
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
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 .
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)