How to Manage Windows Services via Command Line

Windows Services play a major role in how your PC operates behind the scenes. They power everything from networking, printing, Windows Update, authentication, drivers, indexing, and security features. While you can manage services through the Services app (services.msc), using the command line gives you much more control, especially if you’re scripting tasks, managing remote machines, or troubleshooting a system where the GUI isn’t responding.

If you’re reading this guide, chances are you want to learn how to start, stop, configure, or query services directly from the Windows command line — whether through Command Prompt, PowerShell, or advanced tools like SC.exe. The good news is that Windows provides several command-line utilities that make managing services fast, powerful, and automatable.

In this in-depth guide, we’ll explain how Windows services work, the core command-line tools available, and how you can use them to manage services efficiently on Windows 11. Let’s dive in!

Understanding Windows Services Before Using Command Line Tools

Windows Services are background processes that:

  • Start automatically with Windows
  • Run even when no user is logged in
  • Provide system-level features
  • Can run under special accounts (SYSTEM, Local Service, Network Service)
  • Are controlled by the Service Control Manager (SCM)

The command line interacts directly with the SCM, allowing you to:

  • Start or stop services
  • Restart services
  • Change startup types
  • Enable or disable services
  • View detailed service information
  • Query service dependencies
  • Manage services remotely

Now let’s look at the tools and commands that let you do all this.

How to Manage Windows Services via Command Line

Below are all the essential ways to control Windows services using the command line.

1. Manage Services Using SC.exe (Service Controller)

SC.exe is one of the most powerful tools built into Windows for service management.

Query a Service

sc query "ServiceName"

Example:

sc query wuauserv

This shows the service status (running, stopped, paused).

Start a Service

sc start "ServiceName"

Example:

sc start wuauserv

Stop a Service

sc stop "ServiceName"

Enable a Service (Automatic Startup)

sc config "ServiceName" start= auto

Disable a Service

sc config "ServiceName" start= disabled

Note the space after the equals sign — required syntax.

Set Manual Startup Mode

sc config "ServiceName" start= demand

Restart a Service

SC doesn’t have a direct restart command, but you can chain stop and start:

sc stop "ServiceName" & sc start "ServiceName"

Delete a Service

Use with caution:

sc delete "ServiceName"

This removes the service entry from Registry permanently.

2. Manage Services Using NET Commands (Simpler Alternative)

The NET command is simpler but less powerful than SC.

Start a Service

net start "ServiceName"

Stop a Service

net stop "ServiceName"

List All Running Services

net start

NET cannot configure startup types, but it’s great for quick checks.

3. Manage Services Using PowerShell (Most Powerful Method)

PowerShell offers extensive service management with cmdlets.

Get All Services

Get-Service

Get Specific Service Status

Get-Service -Name "ServiceName"

Start a Service

Start-Service -Name "ServiceName"

Stop a Service

Stop-Service -Name "ServiceName"

Restart a Service

Restart-Service -Name "ServiceName"

Change the Startup Type

Set-Service -Name "ServiceName" -StartupType Automatic

Supported startup types:

  • Automatic
  • Manual
  • Disabled

Stop a Service even if dependent services exist

Stop-Service -Name "ServiceName" -Force

Useful for stubborn system services.

View Services by Status

Running:

Get-Service | Where-Object {$_.Status -eq "Running"}

Stopped:

Get-Service | Where-Object {$_.Status -eq "Stopped"}

Manage Services on a Remote PC

PowerShell makes remote service management easy:

Get-Service -ComputerName "RemotePC"

Or:

Start-Service -Name wuauserv -ComputerName "RemotePC"

You must have administrative rights on the remote system.

4. View Detailed Service Information

Using SC.exe:

sc qc "ServiceName"

This displays:

  • Service executable path
  • Startup type
  • Dependencies
  • Logon account
  • Error control

Very helpful for troubleshooting.

5. Check Service Dependencies

sc enumdepend "ServiceName"

This shows which services must run before your service can start.

6. Check Event Logs for Service Errors

Service failures often leave traces in Event Viewer.

Command-line method:

wevtutil qe System "/q:*[System[(EventID=7031 or EventID=7034)]]" /f:text /c:20

This fetches the last 20 service crash/failure events.

7. List All Services with Detailed Information

Get-WmiObject Win32_Service | Format-Table Name,State,StartMode,DisplayName

This gives a detailed table of all services.

8. Create a New Windows Service (Advanced)

You can create your own service using SC:

sc create "MyService" binPath= "C:\Path\To\App.exe"

This is commonly used for custom scripts or server apps.

Common Windows Services You Might Manage

Here are some service names you’ll commonly work with:

  • wuauserv – Windows Update
  • bits – Background Intelligent Transfer Service
  • Dnscache – DNS Client
  • Spooler – Printer Spooler
  • lfsvc – Location Service
  • WinDefend – Microsoft Defender
  • AudioSrv – Windows Audio
  • LanmanWorkstation – Workstation

Knowing the proper service name (not display name) is essential when using command-line tools.

Wrapping Up

Managing Windows services from the command line gives you far more flexibility, speed, and control than the traditional Services app. Whether you’re starting and stopping services, changing startup types, querying service status, or administering remote systems, tools like SC.exe, NET commands, and PowerShell provide everything you need.

We hope this detailed guide helped you understand how to manage Windows services efficiently using command-line tools. If you found it helpful, feel free to explore more of our deeper Windows management tutorials. As always, thank you for reading until the end — and we’ll see you in the next guide!

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.