I need to create Task Schedule with "Delay task for" option for 1 min. I can see PowerShell cmdlet New-ScheduledTaskTrigger has an option -RandomDelay, but I don't think it's valid. I can't see another option in Documentation either (https://technet.microsoft.com/en-us/library/jj649816(v=wps.630).aspx).
$DELAY = new-timespan -minutes 1
$T = New-ScheduledTaskTrigger -AtLogon -RandomDelay $DELAY
Just add this part:
$T.Delay = 'PT1M'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With