≡ Menu

Start or stop Windows service from command line (CMD)

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 serviceServiceName which should be used with ‘net’ and ‘sc config’ commands.
Application Layer Gateway ServiceALG
Application ManagementAppMgmt
ASP.NET State Serviceaspnet_state
Windows AudioAudioSrv
Background Intelligent Transfer ServiceBITS
Computer BrowserBrowser
Bluetooth Support ServiceBthServ
Bluetooth Servicebtwdins
SMS Agent HostCcmExec
Indexing ServiceCiSvc
.NET Runtime Optimization Service v2.0.50727_X86clr_optimization_v2.0.50727_32
COM+ System ApplicationCOMSysApp
Cryptographic ServicesCryptSvc
Cisco Systems, Inc. VPN ServiceCVPND
DCOM Server Process LauncherDcomLaunch
DHCP ClientDhcp
Logical Disk Manager Administrative Servicedmadmin
Logical Disk Managerdmserver
DNS ClientDnscache
Lenovo Doze Mode ServiceDozeSvc
Error Reporting ServiceERSvc
Event LogEventlog
COM+ Event SystemEventSystem
Intel(R) PROSet/Wireless Event LogEvtEng
Fast User Switching CompatibilityFastUserSwitchingCompatibility
Windows Presentation Foundation Font Cache
Group Policy MonitorGPMON_SRV
Help and Supporthelpsvc
HID Input ServiceHidServ
ThinkPad PM ServiceIBMPMSVC
Windows CardSpaceidsvc
IMAPI CD-Burning COM ServiceImapiService
Lenovo Camera MuteLENOVO.CAMMUTE
Lenovo Microphone MuteLenovo.micmute
TCP/IP NetBIOS HelperLmHosts
Intel(R) Management and Security Application Local Management ServiceLMS
McAfee Framework ServiceMcAfeeFramework
McAfee McShieldMcShield
McAfee Task ManagerMcTaskManager
Machine Debug ManagerMDM
NetMeeting Remote Desktop Sharingmnmsrvc
Distributed Transaction CoordinatorMSDTC
Windows InstallerMSIServer
Net Driver HPZ12Net Driver HPZ12
Network DDENetDDE
Network DDE DSDMNetDDEdsdm
Net LogonNetlogon
Network ConnectionsNetman
Net.Tcp Port Sharing ServiceNetTcpPortSharing
Network Location Awareness (NLA)Nla
NT LM Security Support ProviderNtLmSsp
Removable StorageNtmsSvc
Microsoft Office Diagnostics Serviceodserv
Office Source Engineose
Plug and PlayPlugPlay
Pml Driver HPZ12Pml Driver HPZ12
IPSEC ServicesPolicyAgent
Power Manager DBC ServicePower Manager DBC Service
Protected StorageProtectedStorage
Remote Access Auto Connection ManagerRasAuto
Remote Access Connection ManagerRasMan
Remote Desktop Help Session ManagerRDSessMgr
Intel(R) PROSet/Wireless Registry ServiceRegSrvc
Routing and Remote AccessRemoteAccess
Remote RegistryRemoteRegistry
Remote Procedure Call (RPC) LocatorRpcLocator
Remote Procedure Call (RPC)RpcSs
Intel(R) PROSet/Wireless WiFi ServiceS24EventMonitor
Security Accounts ManagerSamSs
Smart CardSCardSvr
Task SchedulerSchedule
Secondary Logonseclogon
System Event NotificationSENS
Windows Firewall/Internet Connection Sharing (ICS)SharedAccess
Shell Hardware DetectionShellHWDetection
Print SpoolerSpooler
System Restore Servicesrservice
SSDP Discovery ServiceSSDPSRV
Windows Image Acquisition (WIA)stisvc
System UpdateSUService
MS Software Shadow Copy ProviderSwPrv
Performance Logs and AlertsSysmonLog
Terminal ServicesTermService
ThinkVantage Registry Monitor ServiceThinkVantage Registry Monitor Service
On Screen DisplayTPHKSVC
Distributed Link Tracking ClientTrkWks
TVT SchedulerTVT Scheduler
Windows User Mode Driver FrameworkUMWdf
Intel(R) Management & Security Application User Notification ServiceUNS
Universal Plug and Play Device Hostupnphost
Uninterruptible Power SupplyUPS
Volume Shadow CopyVSS
Windows TimeW32Time
Windows Management Instrumentationwinmgmt
Portable Media Serial Number ServiceWmdmPmSN
Windows Management Instrumentation Driver ExtensionsWmi
WMI Performance AdapterWmiApSrv
Security Centerwscsvc
Automatic Updateswuauserv
SMS Remote Control AgentWuser32
Wireless Zero ConfigurationWZCSVC
Network Provisioning Servicexmlprov


{ 16 comments… add one }
  • Anonymous

    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

    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

    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

    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

    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

    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

      Any issues with a command like below?

      net start servicename > logfilename
  • ben

    to disable windows error reporting on windows 7 :

    sc config WerSvc start= disabled

  • BigJonMX

    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

    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

    net start webclient and it was successful what to do then

  • John Douglas-Coley

    I have full admin rights to my machine. I have changed all permissions to full control and still I get Access Is Denied when I try to stop services with net stop or sc stop. How can I get full control over the machine. OS is Windows 7 Home Edition

  • Justin Johns

    @John Douglas-Coley I had the same issue so what I did was,
    1. Press the start button in the lower left corner.
    2. In the search bar type “Command Prompt” without the quotation marks.
    3. It should pop up right away when you see it right click and click run as administrator.
    4. The command prompt should open up just type, net stop “windows update”
    5. And boom it should stop! It worked for me anyways good luck to you!

  • Aiden

    Hey. I want to stop ekrn services, I’m an administrator, and when i type: “sc config ekrn start= disabled”, i’ve got this error:
    [SC] ChangeServiceConfig échec(s) 5:

    Accès refusé.

    (Im french, so Accès refusé=Acces denied)
    Someone help?

  • manikanta

    Great .. it is easy to understand & usable for respective situation ..
    Thank you srini….

Leave a Comment

Advertisment ad adsense adlogger