Sie sind auf Seite 1von 8

12/4/2019 Start or stop Windows service from command line (CMD)

≡ MENU

Windows Commands, Batch files, Command prompt and PowerShell

Start or stop Windows service from
command line (CMD)
by SRINI

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:

Multicloud Connectivity

Learn why 60% of enterprises use


21 or more public cloud services.

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. 
C:\>

To disable a service:

sc config servicename start= disabled

To enable a service:

https://www.windows­commandline.com/start­stop­service­command­line/ 1/8
12/4/2019 Start or stop Windows service from command line (CMD)

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.

Wisata Edukasi and La Boss Hotel Gumaya Tower Resorts World


Resort Kebun Pak... Melaka Hotel Semarang Genting ­ Theme...
IDR 340k IDR 337k Rp 1,4 JT Rp 2,0 JT

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.

ServiceName which should be
Display Name of the service 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

https://www.windows­commandline.com/start­stop­service­command­line/ 2/8
12/4/2019 Start or stop Windows service from command line (CMD)

Bluetooth Service btwdins
SMS Agent Host CcmExec
Indexing Service CiSvc
ClipBook ClipSrv
.NET Runtime Optimization Service
clr_optimization_v2.0.50727_32
v2.0.50727_X86
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
3.0.0.0
Group Policy Monitor GPMON_SRV
Help and Support helpsvc
HID Input Service HidServ
HTTP SSL HTTPFilter
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
LMS
Local Management Service
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

https://www.windows­commandline.com/start­stop­service­command­line/ 3/8
12/4/2019 Start or stop Windows service from command line (CMD)

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
QoS RSVP RSVP
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
SharedAccess
(ICS)
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
UNS
User Notification Service
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

https://www.windows­commandline.com/start­stop­service­command­line/ 4/8
12/4/2019 Start or stop Windows service from command line (CMD)

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
 

17 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."

REPLY  LINK

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.

REPLY  LINK

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".

REPLY  LINK

Anonymous

https://www.windows­commandline.com/start­stop­service­command­line/ 5/8
12/4/2019 Start or stop Windows service from command line (CMD)

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.

REPLY  LINK

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?

REPLY  LINK

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.

REPLY  LINK

admin

Any issues with a command like below?

net start servicename > logfilename

LINK

ben

to disable windows error reporting on windows 7 :

sc config WerSvc start= disabled

REPLY  LINK

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!

REPLY  LINK

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

REPLY  LINK

https://www.windows­commandline.com/start­stop­service­command­line/ 6/8
12/4/2019 Start or stop Windows service from command line (CMD)

ann

net start webclient and it was successful what to do then

REPLY  LINK

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

REPLY  LINK

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!

REPLY  LINK

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?

REPLY  LINK

Srini

Looks like you are not running the command from elevated command prompt.

LINK

manikanta

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

REPLY  LINK

MHosein

Hello. I’m with the admin user who will give this command 
And see the error message follows 

https://www.windows­commandline.com/start­stop­service­command­line/ 7/8
12/4/2019 Start or stop Windows service from command line (CMD)

SC Stop Schedule 
[SC] OpenService FAILED 5:

Access is denied.

REPLY  LINK

Leave a Comment

Name *

Email *

Website

Comment

Submit

To search, type and hit enter

M ORE  R ECENT  P OSTS


How to check if Windows 32 or 64 bit?

Get Windows install date

User questions about fixing javac not recognized error

How to Kill process from PowerShell

Fix WMIC invalid alias verb error

How to remove user login password from command prompt

Run command for performance monitor

PowerShell – Failed to update help for the modules

Run command for remote desktop (RDP client)

Find saved outlook emails

E­mail Newsletter

E­mail   Subscribe

https://www.windows­commandline.com/start­stop­service­command­line/ 8/8

Das könnte Ihnen auch gefallen