Start or stop Windows service from command line (CMD)

by admin on August 15, 2010

We normally use Services.msc to start or stop or disable or enable any service. We can do the same from windows command line also using net and sc utilities. Below are commands for controlling the operation of a service.

Command to stop a service:

net stop servicename

To start a service:

net start servicename

You need to have administrator privileges to run net start/stop commands. If you are just a normal user on the computer, you would get an error like below.

C:\>net start webclient
System error 5 has occurred.
Access is denied.

To disable a service:

sc config servicename start= disabled

To enable a service:

sc config servicename start= demand

To make a service start automatically with system boot:

sc config servicename start= auto

Note: Space is mandatory after ‘=’ in the above sc commands.

This SC command works on a Windows 7 machine and also on the down-level editions of Windows i.e Windows XP/2003 and Windows Vista. Again, if you do not have administrator previliges you would get the below error.

C:\>sc config webclient start= auto
[SC] OpenService FAILED 5:
Access is denied.

Note that the service name is not the display name of a service. Each service is given a unique identification name which can be used with net or sc commands. For example, Remote procedure call (RPC) is the display name of the service. But the service name we need to use in the above commands is RpcSs.
So to start Remote procedure call service the command is:

net start RpcSsTo stop Remote procedure call service
net stop RpcSs

These service names are listed below for each service. The first column shows the display name of a service and the second column shows the service name that should be used in net start or net stop or sc config commands.


Display Name of the service ServiceName which should be used with ‘net’ and ‘sc config’ commands.
Alerter Alerter
Application Layer Gateway Service ALG
Application Management AppMgmt
ASP.NET State Service aspnet_state
Windows Audio AudioSrv
Background Intelligent Transfer Service BITS
Computer Browser Browser
Bluetooth Support Service BthServ
Bluetooth Service btwdins
SMS Agent Host CcmExec
Indexing Service CiSvc
ClipBook ClipSrv
.NET Runtime Optimization Service v2.0.50727_X86 clr_optimization_v2.0.50727_32
COM+ System Application COMSysApp
Cryptographic Services CryptSvc
Cisco Systems, Inc. VPN Service CVPND
DCOM Server Process Launcher DcomLaunch
DHCP Client Dhcp
Logical Disk Manager Administrative Service dmadmin
Logical Disk Manager dmserver
DNS Client Dnscache
Lenovo Doze Mode Service DozeSvc
Error Reporting Service ERSvc
Event Log Eventlog
COM+ Event System EventSystem
Intel(R) PROSet/Wireless Event Log EvtEng
Fast User Switching Compatibility FastUserSwitchingCompatibility
Windows Presentation Foundation Font Cache FontCache3.0.0.0
Group Policy Monitor GPMON_SRV
Help and Support helpsvc
HID Input Service HidServ
ThinkPad PM Service IBMPMSVC
Windows CardSpace idsvc
IMAPI CD-Burning COM Service ImapiService
iPassConnectEngine iPassConnectEngine
iPassPeriodicUpdateApp iPassPeriodicUpdateApp
iPassPeriodicUpdateService iPassPeriodicUpdateService
IviRegMgr IviRegMgr
Server lanmanserver
Workstation lanmanworkstation
Lenovo Camera Mute LENOVO.CAMMUTE
Lenovo Microphone Mute Lenovo.micmute
TCP/IP NetBIOS Helper LmHosts
Intel(R) Management and Security Application Local Management Service LMS
McAfee Framework Service McAfeeFramework
McAfee McShield McShield
McAfee Task Manager McTaskManager
Machine Debug Manager MDM
Messenger Messenger
NetMeeting Remote Desktop Sharing mnmsrvc
Distributed Transaction Coordinator MSDTC
Windows Installer MSIServer
Net Driver HPZ12 Net Driver HPZ12
Network DDE NetDDE
Network DDE DSDM NetDDEdsdm
Net Logon Netlogon
Network Connections Netman
Net.Tcp Port Sharing Service NetTcpPortSharing
Network Location Awareness (NLA) Nla
NT LM Security Support Provider NtLmSsp
Removable Storage NtmsSvc
Microsoft Office Diagnostics Service odserv
Office Source Engine ose
Plug and Play PlugPlay
Pml Driver HPZ12 Pml Driver HPZ12
IPSEC Services PolicyAgent
Power Manager DBC Service Power Manager DBC Service
Protected Storage ProtectedStorage
Remote Access Auto Connection Manager RasAuto
Remote Access Connection Manager RasMan
Remote Desktop Help Session Manager RDSessMgr
Intel(R) PROSet/Wireless Registry Service RegSrvc
Routing and Remote Access RemoteAccess
Remote Registry RemoteRegistry
Remote Procedure Call (RPC) Locator RpcLocator
Remote Procedure Call (RPC) RpcSs
Intel(R) PROSet/Wireless WiFi Service S24EventMonitor
Security Accounts Manager SamSs
Smart Card SCardSvr
Task Scheduler Schedule
Secondary Logon seclogon
System Event Notification SENS
Windows Firewall/Internet Connection Sharing (ICS) SharedAccess
Shell Hardware Detection ShellHWDetection
Print Spooler Spooler
System Restore Service srservice
SSDP Discovery Service SSDPSRV
Windows Image Acquisition (WIA) stisvc
System Update SUService
MS Software Shadow Copy Provider SwPrv
Performance Logs and Alerts SysmonLog
Telephony TapiSrv
Terminal Services TermService
Themes Themes
ThinkVantage Registry Monitor Service ThinkVantage Registry Monitor Service
Telnet TlntSvr
On Screen Display TPHKSVC
Distributed Link Tracking Client TrkWks
TVT Scheduler TVT Scheduler
Windows User Mode Driver Framework UMWdf
Intel(R) Management & Security Application User Notification Service UNS
Universal Plug and Play Device Host upnphost
Uninterruptible Power Supply UPS
Volume Shadow Copy VSS
Windows Time W32Time
WebClient WebClient
Windows Management Instrumentation winmgmt
Portable Media Serial Number Service WmdmPmSN
Windows Management Instrumentation Driver Extensions Wmi
WMI Performance Adapter WmiApSrv
Security Center wscsvc
Automatic Updates wuauserv
SMS Remote Control Agent Wuser32
Wireless Zero Configuration WZCSVC
Network Provisioning Service xmlprov


{ 11 comments… read them below or add one }

Anonymous September 8, 2010 at 3:12 pm

I get this error when using this command, anyone have any idea why "
[SC] OpenService FAILED 1060:

The specified service does not exist as an installed service."


Techblogger September 8, 2010 at 3:28 pm

Which OS you are trying this on? Verify that you have given the service name correctly. May be the service you are trying to disable is not installed on the OS edition you have.


Techblogger September 8, 2010 at 3:29 pm

you can find the correct service name by doing the following:

Start > Run > services.msc

right click on the service you want to control and choose Properties

the service name will be listed at the very top of the window as "Service name" and NOT "Display Name".


Anonymous September 8, 2010 at 3:30 pm

We can see which services are being run in the background by typing services.msc in the run window. Also msconfig utility is one of the programs which lets us see which all programs are being started at the startup.


Anonymous July 10, 2011 at 5:21 pm

Yes, I have the same issue (Win 7 Pro). srservice does not start and when trying, it says "The service name is invalid" and does not show up in the Services list using services.msc. I have had a HDD failure and lost some data, clearly.

How can I re-install a lost service?


Amit August 24, 2012 at 1:39 pm

I want to start or stop the windows service using a batch script but I also want to enable some kind of log to capture any failure while start/stop. Kindly help.


admin August 24, 2012 at 6:10 pm

Any issues with a command like below?

net start servicename > logfilename

ben July 16, 2014 at 9:43 pm

to disable windows error reporting on windows 7 :

sc config WerSvc start= disabled


BigJonMX July 29, 2014 at 8:23 am

I keep getting Access Denied, even though I am the administrator and there are no other users on this win7 machine.
I cant find out why sc stop just wont work!


Amit September 30, 2014 at 6:30 am

I created service using SC. When I say start in cmd or in service in task manager, it says Access denied. I opened CMD with admin and I m admin of m achine


ann October 29, 2014 at 7:25 am

net start webclient and it was successful what to do then


Leave a Comment

Previous post:

Next post: