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.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.