Hello, i am trying to create a new task but i am not able to configure the advanced options like:
- Trigger options: Repeat task every *** for a duration of ***
I know i have to use the "-RepetitionDuration & -RepetitionInterval' but whenever is use the following input:
-RepetitionInterval (New-TimeSpan -Minutes 30)
I get an error:
New-ScheduledTaskTrigger : Parameter set cannot be resolved using the specified named parameters.
At line:9 char:20
+ $trigger = New-ScheduledTaskTrigger -Daily -At 12:00 -RepetitionDuration ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-ScheduledTaskTrigger], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,New-ScheduledTaskTrigger
What should i type to get these triggers to work?