PowerShell Scheduled Task didn't run

I opened PowerShell as Administrator and entered the following:
PS C:\WINDOWS\system32> $action = New-ScheduledTaskAction - Execute ‘C:\Users\dee.dee\Test\Test.exe’
PS C:\WINDOWS\system32> $trigger = New-ScheduledTaskTrigger -Daily -At 8am
PS C:\WINDOWS\system32> Register-ScheduledTask -Action $action -Trigger $trigger -TaskPath "\Test" -TaskName “TestTask” -Description “Testing”

It didn’t run. What did I miss? Thanks.

Not sure if the issue is the fact you did not format your code properly, but you have a space between - and Execute … should be:

$action = New-ScheduledTaskAction -Execute ‘C:\Users\dee.dee\Test\Test.exe’

Good catch. Let me remove the space. Thanks.