BUG: ScheduledTaskTrigger -RandomDelay does not work
New-ScheduledTaskTrigger -AtLogOn -RandomDelay 0:15:00; or
New-ScheduledTaskTrigger -AtLogOn -RandomDelay (new-Timespan -Minutes 15)
does not set the delay option. The checkbox in ScheduledTask Panel never gets set.
Windows 10.0.14393 x64 de-DE (German Installation)
CLEMENT Jerome commented
solved. Try this:
"New-JobTrigger -AtLogOn -RandomDelay (new-Timespan -Minutes 15)"
it is better try "New-JobTrigger" instead "New-ScheduledTaskTrigger". All day I am sitting on it and discovered it by accident