WINDOWS
COMMAND LINE
Windows Commands, Batch files, Command prompt and PowerShell
Start or stop Windows service from
command line (CMD)
by SRNL
We normally use Services.mse to start or stop or disable or enable any service. We can do
the same from windows command line also using net and ac utilities. Below are commands
for controlling the operation of a service.
‘Command to stop a service:
net stop servicenane
To start a service:
net start servicenaneYou need to have administrator privileges to run net start/stop commands. Ifyou are just a
normal user on the computer, you would get an error like below.
:\onet start webclient
system error § has occurred.
Access is denied.
ce
‘To disable a servieo:
sc config servicename start- disabled
‘To enable a service:
sc config servicename start~ denand
‘To makea service start automatically with system boot:
sc config servicenane start= auto
‘Note: Space is mandatory after "in the above se commands.
‘This SC command works on a Windows 7 machine and also on the down-level editions of‘Windows ie Windows XP/2003 and Windows Vista. Again, if you do not have
administrator previliges you would get the below error.
:\ose config vebclient starts auto
[se] 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 se 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 RpeSs.
So to start Remote procedure call service the command is:
net start RpcSsTo stop Resote procedure call service
net stop fpcss
‘These service names are listed below for each service. The first column shows the display
name ofa service and the second column shows the service name that should be used in net
start or net stop or sc config commands.[Application Layer Gateway Service |ALG_
|Application Management AppMgmt
[SentiSactene fom oa
Hints —
Pagoda ar
be
Farin
Piwcot Sapa Sane
Fiesconsenie
Siemon
Frag Se
lipBook
|NET Runtime Optimization
Liriereoauray
a
Systems, Inc. VPN Service
beoktSces Peas biaier penta
fir_optimization_va.0.50727_39|
DHCP Client Dhep
Logical Disk Manager
nee fimadimin
|\dministrative Service
[Logical Disk Manager imserver
[pons Gent [Dnscache
[Lenovo Doze Mode Service PozesvefEsror Reporting Service ERsve
Event Log Eventlos
{coms Event System Eventsystem
ft) PROSeY/Wirles Bent FO
hos
fFast User Switching Compatibility FastUserSwitchingCompatibility
[windows Presentation Foundation|
“ontCaches.0.0.0
Font ccke 3000 F
fsroup Policy Monitor ;PMON_SRV
bielp and Support elpsve
FID input service Hidserv
ker sst irRter
[inka PA Service imuPusve
[windows CardSpace sve
[IMAPI CD -Burning COM Service _|imapiService
fPassConnectEngine [PassConnectEngine
fPassPeriodicUpdateApp [PassPeriodicUpdateapp
fpasPerodicUpdteServie_[PassPeridiepdatesersice
hviReeMar eed
ferver Janmanserer
onkstaton Janmanworistation
[cenovo Camera Mate LENOVO caMIMOTE
[fenovo Micophone Mute _Lenovemmiemute
[TCP/IP NetBIOS Helper Lintosts
fntel(R) Management and Security
lApptication Local Management LAIS
bervice(Ae Framework Sevice NeafeeFramework
(ee MeShield shila
Icafee Task Manages Metasiotanager
lachine Debug Manager hom
fessenger Messenger
NetBfeeting Remote Desktop
a nnmsrve
Distributed Transaction
ordinator fsere
[vindows Installer (SiSener
Set Driver HPZAP Net Driver HPAP
setvork DDE NeDDE