How to Start and Stop Windows Services via Command Prompt

Start and Stop window Services from command prompt using NET commands

To start and stop Windows Services from the command prompt, you can utilize the powerful NET commands, which allow for efficient management of services directly from the command line. This method is particularly useful for system administrators or users who prefer using commands rather than navigating through the GUI. To start a service, you would enter NET START service_name, where service_name is the specific name of the service you wish to activate. Conversely, to halt a service, the command is NET STOP service_name. These commands can be especially beneficial for troubleshooting, as they enable you to start or stop services without having to access the Services management console. Additionally, incorporating these commands into scripts can help automate regular maintenance tasks, enhancing system performance and reliability over time.

NET START: List of all currently running Windows services.

D:\ImageCenter\Database\6dbcheck>net start
These Windows services are started:

Adobe Acrobat Update Service
Application Information
Application Management
COM+ Event System
OracleServiceXE
OracleXETNSListener

SC QUERY command give you all services details as follows

sc query

SERVICE_NAME: OracleServiceXE
DISPLAY_NAME: OracleServiceXE
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

SERVICE_NAME: OracleXETNSListener
DISPLAY_NAME: OracleXETNSListener
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

The SC QUERY command shows only the specified service name.

D:\ImageCenter\Database\6dbcheck>sc query OracleServiceXE
SERVICE_NAME: OracleServiceXE
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

NET STOP: Use the command prompt to stop the service.

net stop OracleXETNSListener
 C:\Windows\system32>net stop OracleXETNSListener
 The OracleXETNSListener service is stopping.
 The OracleXETNSListener service was stopped successfully.

net start OracleServiceXE
C:\Windows\system32>net stop OracleServiceXE
The OracleServiceXE service is stopping...................
The OracleServiceXE service was stopped successfully.

NET START : Start the service using the Windows command prompt

net start OracleXETNSListener
C:\Windows\system32>net start OracleXETNSListener
The OracleXETNSListener service is starting.
The OracleXETNSListener service was started successfully.

net start OracleServiceXE
C:\Windows\system32>net start OracleServiceXE
The OracleServiceXE service is starting...............
The OracleServiceXE service was started successfully.

Leave a Reply