How to change priority on Windows scheduled task using Powershell?

By default Windows setups task priority in scheduler to 7 (which is kinda low). The side effect of this is that for eg. backups are taking very long to take. In my case all databases were backed up in about 40-50 minutes…

There are to ways to change priority in task.

  • Export it to xml file and open it using notepad then delete and import – this obviously sucks.
  • Second way is use Powershell and do it like a pro!

Let’s do it pro bruuuh!

Run Powershell interpreter and type as such:

$STSet = New-ScheduledTaskSettingsSet -Priority 5

This way you’ll create settings object with specified priority set to 5. Customize this to your needs. You can find priority levels description here (and probably on thousand other sites).

Task scheduler

Now check ya task names and find what you need to boost:

And type this to your Powershell window:

 Set-ScheduledTask -TaskName "[Your task name]" -Settings $STSet

And voilà!

Warning! You’ll get an error that’s for sure 🙂 That’s because your task is storing user credentials… Edit it and change to Run only when user is logged on and then do everything above, after that switch it back to Run whether user is logged or not.

User settings