I want to change Windows process priority via command line.
How can I do that?
The command line syntax:
below normal: 16384
above normal: 32768
high priority: 128
real time: 256
A small addition.
You can also use string values instead of integers (easier to memorize) like that:
Possible values: "idle", "low", "below normal", "normal", "above normal", "high priority", "realtime"
PS. Don't forget the quotes, especially if using multiple words in a string value
From batch command line I would simply use powershell. This example starts calc.exe, finds it's process and adjusts it priority class to "IDLE" aka LOW.
Specify one of the following enumeration values "
Here is the same thing from powershell with split lines.
In addition to existing answers, the thread Windows Equivalent of 'nice' lists some more solutions :
Additionally, the old SetPriority utility might still work, but I haven't tried it for many years now.
Some of these solutions may not work on system services or may need to be Run as Administrator.
In response to laggingreflex who currently has set an open bounty, stating that the accepted answer does not work:
It does work in Windows 8. Check in Task Manager, or restart Process Explorer.
You may have found a bug/deficiency in Process Explorer.