You can set the priority when you create the task. Or you can write a script that does nothing but update the priority. Pretty sure those are your choices.
--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntsysadmin+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ntsysadmin/9b1a1c65-a079-4092-a5ca-18594f83ba81n%40googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/a097cfe66a63468c8229ea7fa54a5060%40smithcons.com.
Your original post suggested that you were creating the scheduled tasks via scripts. It’s trivial to set the priority within your script. See a normal “create task” from one of my scripts:
[CmdletBinding()]
Param()
## create-eventNetworkTask
## needs to be run from an elevated session
Set-StrictMode -Version latest
$class = Get-CimClass -ClassName MSFT_TaskEventTrigger -NameSpace root/Microsoft/Windows/TaskScheduler
$stTrig = $class | New-CimInstance -ClientOnly
## $stTrig
$stTrig.Enabled = $true
$stTrig.SubScription = '<QueryList><Query Id="0" Path="Microsoft-Windows-NetworkProfile/Operational"><Select Path="Microsoft-Windows-NetworkProfile/Operational">*[System[Provider[@Name=''Microsoft-Windows-NetworkProfile''] and EventID=10000]]</Select></Query></QueryList>'
$actionP =
@{
Execute = 'powershell.exe'
Argument = '-NoLogo -NoProfile -File C:\ProgramData\zzzz\OnNetwork.ps1'
}
$stAction = New-ScheduledTaskAction @actionP
$stPrincipal = New-ScheduledTaskPrincipal -UserID "NT AUTHORITY\SYSTEM" -LogonType ServiceAccount -RunLevel Highest
$stSettings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -Priority 5
$regP =
@{
TaskName = 'Network change script'
TaskPath = '\'
Action = $stAction
Principal = $stPrincipal
Settings = $stSettings
Trigger = $stTrig
}
Register-ScheduledTask @regP
From: ntsys...@googlegroups.com <ntsys...@googlegroups.com>
On Behalf Of maxcoder1
Sent: Wednesday, October 18, 2023 4:10 PM
To: ntsys...@googlegroups.com
Subject: Re: [ntsysadmin] How to set priority on Windows scheduled task using group policy? is it possible?
First of all ,thanks for your help. But , there is no priority setting inside GUI. (GPO Preferences)
AFAIK , There is a powershell command like below.
How to set priority on Windows scheduled task? What do you recommend?
$STSet = New-ScheduledTaskSettingsSet -Priority 5
Set-ScheduledTask -TaskName "[Your task name]" -Settings $STSet

On Wed, Oct 18, 2023 at 6:37 PM Michael B. Smith <mic...@smithcons.com> wrote:
You can set the priority when you create the task. Or you can write a script that does nothing but update the priority. Pretty sure those are your choices.
From: ntsys...@googlegroups.com <ntsys...@googlegroups.com> On Behalf Of selahattin sadoglu
Sent: Wednesday, October 18, 2023 11:33 AM
To: ntsysadmin <ntsys...@googlegroups.com>
Subject: [ntsysadmin] How to set priority on Windows scheduled task using group policy? is it possible?
Hello everyone,
In our environment we have Windows Server 2016 domain controllers with 2016 functional level, and lots of Windows 10 & 11 client machines.
We have created a gpo which copies some scripts to local computer folder and which creates the registry keys and which creates (with update option) a Scheduled task, which has to run at startup.
AFAIK,By default Windows setups task priority in scheduler to 7 (which is kinda low).
My question is : I want to change priority on Windows scheduled task using group policy? is it possible?
thanks,--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/9b1a1c65-a079-4092-a5ca-18594f83ba81n%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/a097cfe66a63468c8229ea7fa54a5060%40smithcons.com.
--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntsysadmin+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/CAKXd-rAjw0MXJpFD6KFcKmuK%3D6dXVz-qENxmpRCnrw4Nop9ajA%40mail.gmail.com.



To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/bdf60cab6baa427db34c5666f34c44f1%40smithcons.com.