Windows – “Access is denied”, only when trying to run script over telnet

batchtelnetwindowswindows-server-2008

I have a batch script that restarts a Windows Service with:

Net stop <servicename>
Net start <servicename>

I got around having to manually run it as Admin by creating a shortcut to it and marking this shortcut to always run as Admin.

By then turning off the need for manual confirmation when running it, I was able to run it as a normal (non-admin) user from the the command line.

When I run it via telnet however (with exactly the same user), I get an "Access is denied" error.

I get this error regardless of which commands are in the batch script, but I am also unable to run the 'Net stop/start' commands individually outside the script because of permissions errors.

Best Answer

I think you may need to modify the LocalAccountTokenFilterPolicy registry key. More info here.