Scheduling Stop/Start Routing and Remote Access

sglee
sglee used Ask the Experts™
on
Hi,
 
 I have Windows 2012 Server and Routing and Remote Access service stops at time for no good reason.
 So instead of troubleshooting the issue, I decide to run a scheduled task to stop/start RRAS service every hour or day using a batch file "Restart-RRAS.bat" with two commands
net stop remoteaccess
net start remoteaccess

But I learned that I could not run it in normal command window. Rather I have open "Command Prompt(Administrator)" to run these commands. I also learned that I could use RUNAS command like:
RUNAS /netonly /user:vpn\administrator cmd, but the problem is that I have to store password in a text file which I don't want to do.

Is there a better solution?

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
run the task with highest priviledges

Author

Commented:
"run the task with highest priviledges" --> it works. Thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial