Olaf
November 29, 2023, 11:33am
2
as21,
Welcome to the forum.
I have separated your post from the topic …
In Windows 2012 (myServer1), I have a scheduled taks (myTask) running as myDomain\user1. I can manually run it any time in addition it runs as scheduled.
After myServer1 was upgraded directly to 2019, myTask still runs successfully as scheduled, but when I run it manually, it failed with error message:
The user account does not have permission to run this task.
I tried the following command to assign permission to user1
$taskPath = ""
$taskName = “myTask”
$principal = New-ScheduledTaskPrin…
Please do not hijack threads from others. If you have a similar or follow up question you can create a new question for yourself and link the according thread as needed.
As for your question:
as21:
Any idea?
How about using a loop?