title: Powershell - Create Scheduled Task to run as local system / service
body: <p>Can anyone tell me how to create a scheduled task using powershell that runs as the local system or local service?</p>
  
  <p>Everything works great except the call to ITaskFolder.RegisterTaskDefinition().</p>
  
  <p>If I pass in $null, or "", than the call bombs saying invalid username or password.
  Any thoughts"</p>
  
  <p>$Rootfolder.RegisterTaskDefinition("Test", $Taskdef, 6, "LOCAL SERVICE", "", 3)</p>