title: Enable task to be deleted after X time
body: <p>How can I enable a task created using PowerShell's <code>Register-ScheduledTask</code> to be deleted If the task is not scheduled to run again?  As in <code>New-JobTrigger -Once -At $ScheduledTime</code></p>
  
  <p>The option is seen in the Task Scheduler GUI > Task Properties > Settings tab > The last checkbox option reads:</p>
  
  <p>If the task is not scheduled to run again, delete it after: <code>&lt;time period&gt;</code></p>
  
  <p><a href="https://technet.microsoft.com/en-us/library/cc722178(v=ws.11).aspx" rel="nofollow">MS TechNet article</a>  Searching for enabling this option using PowerShell does not turn up any relevant results, mostly how to enable tasks and so on.</p>