Windows Administrator Basics: Managing Services from Command Line

Managing Windows services from command line

Part1: Windows Administrator Basics: Windows Services
Part3: Windows Administrator Basics: Managing Windows services from Powershell


Net Command: You can use NET START and NET STOP command to start and stop Windows service.

Using Net command to start a Windows Service

NET START   < ServiceName >


Using Net command to stop a Windows Service

NET STOP < Service Name >




SC (Service Control) Command : SC.exe is a powerful command line tool to manage Windows Services. This can be used to Query, Start,Stop,Create or Delete a Windows service. This tool can manage the services on remote computer as well. In this article, we are going to explore Query , start and stop options only.

Query Service status of specific service on Local machine

SC QUERY < Service Name >



Query Service status of specific service on Remote machine

SC < \\Computer Name > QUERY < Service Name >




Query Service status of all services on local machine

SC QUERY 





Stop a Service on local machine

SC STOP < Service Name >




Start a Service on local machine

SC START < Service Name >




Start a service on Remote machine

SC < \\Computer Name > START < Service Name >




Stop a service on Remote machine

SC < \\Computer Name > STOP < Service Name >






Comments

Popular posts from this blog

SCCM Software Distribution Troubleshooting

Powershell - List AD Organizational Unit and GPOs linked to them

Troubleshooting System Center Endpoint Protection (SCEP) Client