I am trying to create a script at logon which creates a task that schedules a restart each evening.
I am able to get the task to schedule as well as run the command i am executing in the task. I am unable to get the task itself to run due to users not having any local admin rights. here is the script:
SCHTASKS /Delete /TN * /F
SCHTASKS /Create /SC DAILY /ST 23:59:00 /TN "Nightly Restart" /TR "Shutdown.exe /r /f /t 30" /RU DOMAIN\username /RP "password"
Any insight on being able to schedule the task and allow the users to run it will be very helpful thanks.