#Create new scheduled task running as service account Register-ScheduledTask -Xml (Get-Content "task-etl-full.xml" -Raw) -TaskName "BC ETL Full" -User "SYSTEM" -Force # Enable the log wevtutil set-log "Microsoft-Windows-TaskScheduler/Operational" /enabled:true # Manually run the task right now to test it Start-ScheduledTask -TaskName "BC ETL Full" # Wait a few seconds, then check the result Start-Sleep -Seconds 5 Get-ScheduledTask -TaskName "BC ETL Full" | Get-ScheduledTaskInfo | Select LastRunTime, LastTaskResult # LastTaskResult of 0 is success, 1 is failed # Check c:\etl\log\task-full.log