Learn › Windows Server

Windows Services, Processes and Event Viewer: Where to Look First

When something breaks on a Windows server, check services, processes and event logs – in that order. Learn the GUI and the PowerShell commands for each.

Beginner 10 min read
By Gopinath Karthikeyan

Most “the application is down” tickets end in one of three places: a service that stopped, a process that’s misbehaving, or an error in the event log that explains why. This guide shows you how to check all three quickly.

1. Services – the things that run in the background

A service is a program Windows starts by itself, usually at boot, without anyone logging in: IIS, SQL Server, the print spooler, your company’s monitoring agent.

GUI: press Win + R, type services.msc.

PowerShell:

# Is it running?
Get-Service -Name W3SVC

# Find a service when you only know part of the name
Get-Service *spool*

# Automatic services that are NOT running – a great first check
Get-CimInstance Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" |
    Select-Object Name, DisplayName, State, StartName

# Start, stop, restart
Start-Service -Name Spooler
Restart-Service -Name Spooler

Things to notice on every service:

Property Why it matters
Startup type Automatic services should be running after boot
Log On As The account it runs as – an expired password stops it from starting
Dependencies A service won’t start if a service it depends on is stopped
Recovery What Windows does if it crashes (restart it, run a program, nothing)

2. Processes – what’s actually using the server

A process is a running program. One service can run several processes, and some processes are just users’ apps.

GUI: Task Manager → Details tab (add the Command line column – it shows which app a w3wp.exe or java.exe really is).

PowerShell:

# Top 10 by CPU time
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, Id, CPU, WS

# Top 10 by memory (WS = working set, in bytes)
Get-Process | Sort-Object WS -Descending |
    Select-Object -First 10 Name, Id, @{n='MemMB';e={[math]::Round($_.WS/1MB)}}

# Which service is behind a process ID?
Get-CimInstance Win32_Service -Filter "ProcessId=1234" | Select-Object Name, DisplayName

Stop a stuck process only when you know what it is: Stop-Process -Id 1234. Killing the wrong svchost.exe can take several services down at once.

3. Event Viewer – the server’s diary

Windows writes what happened, and often why, to event logs.

GUI: eventvwr.msc. The three logs you’ll use most:

  • System – services starting and stopping, drivers, disks, unexpected shutdowns
  • Application – errors from applications like IIS, SQL Server and .NET
  • Security – logons, failed logons, permission changes (needs admin rights)

PowerShell (Get-WinEvent is faster than the older Get-EventLog):

# Errors and critical events in the System log, last 24 hours
Get-WinEvent -FilterHashtable @{
    LogName   = 'System'
    Level     = 1, 2            # 1 = Critical, 2 = Error
    StartTime = (Get-Date).AddDays(-1)
} | Select-Object TimeCreated, Id, ProviderName, Message -First 20

# Why did the server restart? (1074 = planned restart, 6008 = unexpected shutdown)
Get-WinEvent -FilterHashtable @{ LogName = 'System'; Id = 1074, 6008 } -MaxEvents 5 |
    Format-List TimeCreated, Id, Message

Event IDs worth remembering:

ID Log Meaning
7000 / 7009 System A service failed to start / timed out starting
7031 / 7034 System A service stopped unexpectedly
1074 System Someone or something restarted the server (with the reason)
6008 System The previous shutdown was unexpected
4625 Security Failed logon

A 5-minute troubleshooting routine

  1. Service: is it running? If not, try to start it and read the error.
  2. Event log: filter System and Application for errors around that time.
  3. Logon account: has its password changed or expired?
  4. Process: is something else eating CPU or memory?
  5. Disk: is a drive full? Get-PSDrive -PSProvider FileSystem

Write down what you found before you change anything – it’s the first line of your incident notes.

FAQ

Get-EventLog or Get-WinEvent? Use Get-WinEvent. Get-EventLog only reads the classic logs and doesn’t exist in PowerShell 7.

A service keeps stopping – how do I make it restart automatically? Open its properties → Recovery tab → set First failure to Restart the Service. Then find out why it crashes; recovery only hides the symptom.

What’s next

Next: Active Directory basics – users, groups and OUs.

Practise this topic

Test yourself with free questions on this topic – instant answers and explanations.

Start practice questions

Windows ServerTroubleshootingEvent ViewerServicesPowerShellBeginner

Gopinath Karthikeyan

Gopinath Karthikeyan – Windows Site Reliability Engineer with about 12 years in enterprise Windows Server infrastructure, and founder of WinOps Academy. YouTube · LinkedIn

More in Windows Server