Can I set PowerShell 'Start-Job' with low priority?

Barry Chum picture Barry Chum · Oct 21, 2012 · Viewed 7k times · Source

I would like to lower the priority of the jobs that I start with Start-Job in PowerShell scripts. Is this possible?

Answer

Roman Kuzmin picture Roman Kuzmin · Oct 21, 2012

I used this trick right in a job's code (it can be optional, controlled by a parameter):

[System.Threading.Thread]::CurrentThread.Priority = 'Lowest'

Available priority values: Lowest, BelowNormal, Normal, AboveNormal, Highest