Reputation: 4056
I have this setup as a scheduled task in windows to run this batch file:
powershell.exe restart-computer
EXIT
Powershell is working as other commands work.
The task returns 0x1 which I believe means a failure relating to permissions?
I run the task with the option to run it when I'm logged in or not and with highest privileges.
When I type restart-computer in powershell it works.
Upvotes: 0
Views: 2887
Reputation:
Have you tried using the -force parameter?
powershell.exe restart-computer -force
Upvotes: 1