Managing Services
SC
Service Controller (sc) is one of the Windows utilities used to manage services; others are wmic and tasklist. This command is CMD-specific.
Query running services.
sc query type= serviceStart/stop a service. Note that not all services will respond to a stop request, regardless of our permissions, if other running programs/services depend on them.
sc <start | stop> <service>Query Windows Defender.
sc query windefendWhen modifying a service, the changes will come into effect after the service is restarted. All changes made are reflected in the Windows registry and will persist on reboot, so services can be taken out permanently.
# modifying start type (service won't be able to start with 'sc start <service>'
sc config <service> start= disabled
# trying to start the service
sc start <service>
[SC] StartService FAILED 1058:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
# reverting the change
sc config <service> start= autoOther Tools
Tasklist
Query running services.
tasklist /svcNet Start
# query running services
net start
# manage a service
net <start | stop | pause | continue> <service>
WMIC
# query running services
wmic service list briefLast updated