Starting/Stopping a service on Windows 2008 Server from the command line - access denied
-
03-07-2019 - |
Question
I am trying to start a service from the command line using "net start SERVICENAME" and I get an access denied error.
I am an administrator on this server since I am in a domain group that are admins on the server. I can start/stop the service from the Services tool.
I am new to 2008/Vista so maybe I am just missing something..
update: I did not use "run as administrator". Is this something new in 2008? Where do I find this option?
Solution
- Type cmd into the search box in the start menu.
Right click on cmd.exe and Run As Administrator.
You could also create a shortcut to cmd and set the shortcut to run as administrator if this is something you're going to do often.
OTHER TIPS
This might work:
runas /user:administrator net start SERVICENAME
Alternatively, you could:
runas /user:DOMAIN\Administrator cmd
To launch another shell with admin privileges.
net start SERVICENAME
In case you needed to run more than one command as the administrator...