Home / Server / Windows Server / How to Manage Services on Windows Server

How to Manage Services on Windows Server

Windows services are background processes that run without a user interface — web servers, databases, print spoolers, update agents, and hundreds of others. Knowing how to start, stop, restart, and configure services from the command line is an essential server admin skill, especially when remote desktop is not available or an application is unresponsive.

View Services via Services.msc

The GUI approach: press Win + R and type services.msc. This opens the Services console showing all services, their status (Running/Stopped), startup type (Automatic/Manual/Disabled), and the account they run under. Double-click any service to see its full properties, dependencies, and recovery actions.

Manage Services via PowerShell

# List all services
Get-Service

# List running services
Get-Service | Where-Object {$_.Status -eq 'Running'}

# Find a specific service
Get-Service -Name "W3SVC"  # IIS
Get-Service -Name "MSSQLSERVER"  # SQL Server default instance

# Start a service
Start-Service -Name "W3SVC"

# Stop a service
Stop-Service -Name "W3SVC"

# Restart a service
Restart-Service -Name "W3SVC"

# Force stop (when normal stop fails)
Stop-Service -Name "W3SVC" -Force

Manage Services via Command Prompt

# Start a service
net start "World Wide Web Publishing Service"

# Stop a service
net stop "World Wide Web Publishing Service"

# Using the shorter service name
sc start W3SVC
sc stop W3SVC
sc query W3SVC

Change Service Startup Type

# Set to Automatic (starts with Windows)
Set-Service -Name "W3SVC" -StartupType Automatic

# Set to Manual (starts only when explicitly called)
Set-Service -Name "W3SVC" -StartupType Manual

# Set to Disabled (prevents starting)
Set-Service -Name "W3SVC" -StartupType Disabled

In services.msc: double-click the service → General tab → Startup type dropdown.

Find Services That Failed to Start

# Services that are set to Automatic but not running
Get-Service | Where-Object {$_.StartType -eq 'Automatic' -and $_.Status -ne 'Running'} | Select-Object Name, DisplayName, Status

Run this after a server restart to quickly identify anything that should be running but is not. Cross-reference with Event Viewer for the error that caused the failure.

Check Service Dependencies

Some services depend on others — stopping a dependency stops the dependent service too:

# Show what services depend on a service (dependents)
(Get-Service -Name "LanmanServer").DependentServices

# Show what services this service depends on (dependencies)
(Get-Service -Name "W3SVC").ServicesDependedOn

In services.msc: double-click the service → Dependencies tab. This is critical before stopping a service — stopping the wrong service can cascade and stop things you did not intend.

Configure Service Recovery Actions

Configure a service to restart automatically if it fails:

  1. In services.msc, double-click the service
  2. Click the Recovery tab
  3. Set First failure, Second failure, and Subsequent failures to Restart the Service
  4. Set the restart delay (1–2 minutes is typical)
# Via sc.exe (command line)
sc failure W3SVC reset= 86400 actions= restart/60000/restart/60000/restart/60000

The reset= value is the time in seconds after which the failure count resets. The actions= value defines action/delay pairs in milliseconds.

Manage Services on a Remote Server

# Get services on a remote server
Get-Service -ComputerName REMOTESERVER

# Restart a service on a remote server
Invoke-Command -ComputerName REMOTESERVER -ScriptBlock { Restart-Service -Name "W3SVC" }

# Or via sc.exe
sc \\REMOTESERVER start W3SVC

Key Service Names to Know

  • W3SVC — IIS World Wide Web Publishing Service
  • MSSQLSERVER — SQL Server (default instance); named instances use MSSQL$INSTANCENAME
  • NTDS — Active Directory Domain Services
  • DNS — DNS Server
  • DHCPServer — DHCP Server
  • Spooler — Print Spooler
  • wuauserv — Windows Update
  • WinRM — Windows Remote Management (required for remote PowerShell)
  • VSS — Volume Shadow Copy Service (used by backups)

Sign Up For Daily Newsletter

Stay updated with our weekly newsletter. Subscribe now to never miss an update!

[mc4wp_form]

Leave a Reply

Your email address will not be published. Required fields are marked *