title: Creating a task scheduler using Powershell script
body: <p>PowerShell script doesn't run when using Start in (Optional) field.</p>
  
  <p>I have simple PowerShell Script to create a task scheduler which schedule the task and job will run the bat file. I was able to create the task but I have to add the path @ Start in (optional) field. I was able to add the path in Add arguments but not finding the details how can I add the file path to Start in.</p>
  
  <pre><code>$Trigger= New-ScheduledTaskTrigger -At 10:00am -Once
  $User= "username"
  $Action= New-ScheduledTaskAction -Execute "full BAT file location\123.bat" -Argument "bat file location"
  Register-ScheduledTask -TaskName "BAT Task" -Trigger $Trigger -User $User -Action $Action -RunLevel Highest –Force
  </code></pre>
  
  <p>When I run the PS script it should add the details in Start in field.</p>