title: Powershell New-ScheduledTaskTrigger recurring task with -RepetitionInterval
body: <p>I'm finding the errors related to ScheduledTask cmdles give extremely cryptic errors. 
  I want to schedule a test task to run every 1 minute and repeat forever.
  Here's what I'm trying, but no success: </p>
  
  <pre><code>cls
  #$Action = New-ScheduledTaskAction -Execute "e:\Scripts\TestClusteredTask.cmd"
  $DurationTimeSpan = New-TimeSpan -Minutes 1 
  $DurationTimeSpanIndefinite = ([TimeSpan]::MaxValue) 
  $DurationTempTest = New-TimeSpan -Days 1000
  $Trigger = New-ScheduledTaskTrigger -Daily -At "00:01" -RepetitionInterval $DurationTimeSpan -RepetitionDuration $DurationTempTest  
  </code></pre>
  
  <p>also tried this: </p>
  
  <pre><code>$Trigger = New-ScheduledTaskTrigger -Daily -At "00:01" -RepetitionInterval $DurationTimeSpan -RepeatIndefinitely 
  </code></pre>
  
  <p>Error Output: </p>
  
  <pre><code>New-ScheduledTaskTrigger : Parameter set cannot be resolved using the specified named parameters.
  At C:\Users\nwalters\Documents\AddTestClusteredTask.ps1:6 char:12
  + $Trigger = New-ScheduledTaskTrigger -Daily -At "00:01" -RepetitionInterval $Dura ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:) [New-ScheduledTaskTrigger], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameterSet,New-ScheduledTaskTrigger
  </code></pre>
  
  <p>I'm referencing this web page for instructions. <a href="http://technet.microsoft.com/en-us/library/hh849759.aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/hh849759.aspx</a></p>
  
  <p>Powerhsell Version 4 on Win 2012/R2 </p>