I am working on PS script that will run a task once the computer has been logged in. Here is how I schedule the task:
$trigger = New-JobTrigger -AtLogOn
Register-ScheduledJob -Name TestSchedule -FilePath <filepath> -Trigger $trigger
The script scheduled to run does nothing but launch the command prompt, however nothing is being run once I log in to the computer. I have tried tinkering with it all I could but I get nothing.