Windows service troubleshooting: accounts, dependencies and activation

“The service won’t start” is a ticket you’ll fix again and again. Windows service troubleshooting goes quickly once you know the usual causes: the wrong account or password, a missing dependency, a timeout or a disabled start type. Activation errors belong here as well, because they come from a service that can’t reach something it needs.

You’ll find services that ought to be running, read a service’s account and dependencies, match services to processes and check activation health. After that you’ll break a service twice, once with a timeout and once with a disabled dependency, and fix both.

TimeYou needBy the end you can
About 75 minutesSRV01 with IIS (Lesson 25)Find why any service won’t start and fix it, and diagnose activation errors such as 0xC004F074

What it is, in one line

Windows service troubleshooting means reading a service’s configuration, account, dependencies and events to work out why it won’t start or keeps stopping.

In Simple Words

In Simple Words

Think of a shop that opens every morning. The shopkeeper needs the right key for the door, the electricity has to be on already, and he has to turn up before opening time. If the shop stays shut, you ask whether he had the wrong key, whether the power was off, or whether he got there too late. A Windows service needs the same kind of things: the right account and password (the key), the services it depends on (the electricity), and a start that finishes within the time Windows is willing to wait.

Engineer's View

Engineer’s View

Configuration: every service has a start type (Automatic, Automatic (Delayed Start), Manual, Disabled, plus trigger start), a binary path, a logon account (LocalSystem, LocalService, NetworkService, a domain account or a gMSA) and its dependencies. You can read all of it with sc.exe qc or Get-CimInstance Win32_Service.

Key events (System log, Service Control Manager): 7000 failed to start, 7001 dependency failed, 7009 timeout while waiting, 7011 timeout during a control request, 7023 and 7024 stopped with an error, 7031 and 7034 crashed, 7038 couldn’t log on with the configured password, 7040 start type changed.

Common errors: 1053 (didn’t respond in time), 1069 (logon failure, either a wrong password or an account without “Log on as a service”), 1058 (disabled), 1068 (a dependency failed to start) and 5 (access denied).

Activation: Windows is activated by the Software Protection service (sppsvc). 0xC004F074 means no KMS host could be reached, so check the KMS host, TCP 1688, the _vlmcs._tcp SRV record in DNS and the time (more than 4 hours apart breaks it). 0x8007232B means the SRV record wasn’t found, and 0xC004F038 means the KMS count is too low (5 for servers).

How it works, step by step

What a service needs before it can run:

Windows service troubleshooting checklist: account, dependencies, start type and timing

Begin with the System log. The Service Control Manager writes a clear event for nearly every failure, with an error number you can look up.

Then go through the four usual suspects (account and password, dependencies, start type and timing), because most failures turn out to be one of them.

If the service starts and then dies, the problem is usually in the application itself, so look at its own logs and at the Application log for crash events (1000).

Event or error, meaning and fix:

Windows service troubleshooting events 7000, 7001 and 7038 with fixes

You’ll do the whole lab on SRV01:

  • Find Automatic services that aren’t running.
  • Read a service’s account, triggers and dependencies.
  • Map services to their processes.
  • Read recent service errors from the System log.
  • Check activation and the KMS DNS record.

Hands-on lab: inspect services and activation

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

Start DC01 and SRV01, and work on SRV01 as SAATLAB\adm.rahul in PowerShell as administrator.

1Find Automatic services that are not running

On SRV01:

Get-CimInstance Win32_Service -Filter "StartMode='Auto' AND State<>'Running'" |
    Select-Object Name, State, ExitCode, DelayedAutoStart | Format-Table

You’ll see something like this:

Name       State   ExitCode DelayedAutoStart
----       -----   -------- ----------------
gpsvc      Stopped        0 False
MapsBroker Stopped        0 True
sppsvc     Stopped        0 True
WbioSrvc   Stopped     1077 False

Not every stopped Automatic service is a problem. Some start, do their job and stop (sppsvc), some are trigger-started, and some have nothing to do on a server, and exit code 0 is normal. What you chase is a non-zero exit code on a service you need.

✅ Checkpoint: You have a list of Automatic services that aren’t running, with their exit codes.

2Read account, triggers and dependencies

On SRV01, take a look at the web service:

sc.exe qc W3SVC
Get-Service W3SVC -RequiredServices | Select-Object Name, Status, StartType

You’ll see something like this:

[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: W3SVC
        TYPE               : 20  WIN32_SHARE_PROCESS
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\Windows\system32\svchost.exe -k iissvcs
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : World Wide Web Publishing Service
        DEPENDENCIES       : WAS
                           : HTTP
        SERVICE_START_NAME : LocalSystem

Name Status  StartType
---- ------  ---------
HTTP Running Manual
WAS  Running Manual

W3SVC runs as LocalSystem inside a shared svchost and can’t start until WAS and HTTP are up. Dependencies set to Manual are fine, since the Service Control Manager starts them when W3SVC needs them, but Disabled isn’t, as the Break It lab will show you.

✅ Checkpoint: You can read a service’s start type, binary path, account and dependencies.

3Map services to processes

On SRV01:

$s = Get-CimInstance Win32_Service -Filter "Name='W3SVC'"
$s.ProcessId
tasklist /svc /fi "PID eq $($s.ProcessId)"

You’ll see something like this:

3184

Image Name                     PID Services
========================= ======== ============================================
svchost.exe                   3184 W3SVC, WAS

W3SVC and WAS share one process, so if you kill that process to “restart IIS” you stop both of them and anything else living in it. Use Restart-Service instead, and keep this mapping in mind when one svchost is eating a lot of CPU or memory.

✅ Checkpoint: You know which process hosts W3SVC and which other services share it.

Windows service troubleshooting lab: W3SVC and WAS share one svchost process
Windows service troubleshooting: mapping a service to its shared process

4Read recent service errors

On SRV01, list the Service Control Manager errors from the last 7 days:

Get-WinEvent -FilterHashtable @{ LogName = 'System'; ProviderName = 'Service Control Manager'; Level = 2; StartTime = (Get-Date).AddDays(-7) } -ErrorAction SilentlyContinue |
    Group-Object Id | Select-Object Name, Count,
        @{ n = 'Latest'; e = { (($_.Group | Sort-Object TimeCreated)[-1].Message -split "\r?\n")[0] } } | Format-Table -Wrap

You’ll see something like this:

Name Count Latest
---- ----- ------
7031     1 The Print Spooler service terminated unexpectedly.  It has done this 1 time(s).  The following
           corrective action will be taken in 60000 milliseconds: Restart the service.
7034     1 The World Wide Web Publishing Service service terminated unexpectedly.  It has done this 1 time(s).

Grouping by event ID shows you patterns quickly: one crash is noise, but the same crash every night deserves a ticket. What you see here depends on what you broke in earlier lessons.

✅ Checkpoint: You can list and group service errors by event ID.

5Check activation and the KMS record

On SRV01:

cscript //nologo C:\Windows\System32\slmgr.vbs /dlv | Select-String 'Name:|License Status|activation expiration'
Resolve-DnsName _vlmcs._tcp.saatlab.internal -Type SRV

You’ll see something like this:

Name: Windows(R), ServerDatacenterEval edition
License Status: Licensed
Timebased activation expiration: 205920 minute(s) (143 day(s))

Resolve-DnsName : _vlmcs._tcp.saatlab.internal : DNS name does not exist

The lab runs evaluation copies, so there’s no KMS host and no _vlmcs record. In a company that uses KMS, that missing record is what causes 0x8007232B, and an old record pointing at a dead host causes 0xC004F074. Your next checks would be Test-NetConnection kms-host -Port 1688 and the time with w32tm /query /status.

✅ Checkpoint: slmgr shows the license status, and you know which DNS record KMS clients look for.

Break It, Then Fix It

You’ll run into both of these often: a program installed as a service that never reports in, and a service whose dependency has been disabled.

1Break it: a service that times out

On SRV01, register Notepad as a service. It isn’t a real service program, so it never tells Windows it has started:

New-Service -Name SaatDemo -BinaryPathName 'C:\Windows\System32\notepad.exe' -StartupType Manual
Start-Service SaatDemo

After roughly 30 seconds you’ll see something like this:

Start-Service : Service 'SaatDemo (SaatDemo)' cannot be started due to the following error: Cannot start service
SaatDemo on computer '.'.

Now read the events that explain what happened:

Get-WinEvent -FilterHashtable @{ LogName = 'System'; ProviderName = 'Service Control Manager'; Id = 7000, 7009 } -MaxEvents 2 |
    Select-Object Id, @{ n = 'Message'; e = { ($_.Message -split "\r?\n")[0] } } | Format-Table -Wrap

You’ll see something like this:

  Id Message
  -- -------
7000 The SaatDemo service failed to start due to the following error: The service did not respond to the start or
     control request in a timely fashion.
7009 A timeout was reached (30000 milliseconds) while waiting for the SaatDemo service to connect.

The Service Control Manager gives a new service 30 seconds to report “running”, and an ordinary program can’t do that, so it gets killed. Real services hit the same timeout when they’re slow to start, for example while they wait for a database or a network drive.

To fix it, remove the fake service:

sc.exe delete SaatDemo

You should see this:

[SC] DeleteService SUCCESS

If a real program has to run in the background, use a scheduled task (Lesson 27) or a proper service wrapper. Only raise the ServicesPipeTimeout registry value when a vendor tells you their service needs longer to start.

✅ Checkpoint: Start-Service failed with events 7009 and 7000, and the fake service is deleted.

2Break it: disable a dependency

On SRV01, stop IIS, disable WAS and then try to start the web service:

Stop-Service W3SVC, WAS -Force
Set-Service WAS -StartupType Disabled
Start-Service W3SVC

You’ll see something like this:

Start-Service : Service 'World Wide Web Publishing Service (W3SVC)' cannot be started due to the following error:
Cannot start service W3SVC on computer '.'.

Check the event:

Get-WinEvent -FilterHashtable @{ LogName = 'System'; ProviderName = 'Service Control Manager'; Id = 7001 } -MaxEvents 1 |
    Select-Object -ExpandProperty Message

You’ll see something like this:

The World Wide Web Publishing Service service depends on the Windows Process Activation Service service which
failed to start because of the following error:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Windows service troubleshooting break lab: W3SVC fails because WAS is disabled
The vague start error, and event 7001 naming the disabled dependency

The error on W3SVC doesn’t tell you much, but event 7001 names the real culprit. This often happens when someone “hardening” a server disables a service without checking what depends on it.

To fix it, set WAS back to Manual and start W3SVC:

Set-Service WAS -StartupType Manual
Start-Service W3SVC
Get-Service W3SVC, WAS | Select-Object Name, Status, StartType

You’ll see something like this:

Name  Status  StartType
----  ------  ---------
W3SVC Running Automatic
WAS   Running Manual

Before you disable any service, find out what depends on it with Get-Service NAME -DependentServices.

✅ Checkpoint: W3SVC failed with event 7001 while WAS was disabled, and runs again after WAS is set to Manual.

This happened at work

The database that started before its disk

A reporting server kept its database files on an iSCSI disk, and after every monthly patch restart the database service failed and someone had to start it by hand. During the day a manual start always worked, which confused everyone for a while. When someone finally read the System log in order, it was all there: the database service failed with “path not found” at 06:01:12 and the iSCSI disk came online at 06:01:40, so the service was simply quicker than the storage. Two small changes sorted it out. The team added the iSCSI Initiator service (MSiSCSI) as a dependency with sc.exe config, and marked the volume as a bound volume in the iSCSI Initiator, so Windows waits for it before starting the services that depend on it.

The fix: any service with data on network storage now gets explicit dependencies, and every new build includes a restart test.

The lesson: “it works when I start it by hand” usually means a timing or dependency problem, so read the event times in order.

Common mistakes and troubleshooting

MistakeWhat happensWhat to do instead
Changing a service account password in AD onlyEvent 7038 and 1069 at next restartUpdate the service too, or use a gMSA
Using a domain admin as a service accountHuge risk if it leaksLeast-privilege account or gMSA
Disabling services without checking dependentsOther services fail (7001)Check -DependentServices first
Killing a shared svchostSeveral services stop at onceRestart-Service the one you need
Raising ServicesPipeTimeout for every slow serviceHides real problemsFind why it’s slow; raise only on vendor advice
Treating every stopped Automatic service as brokenWasted timeCheck trigger start, delayed start and exit code
Ignoring recovery optionsCrashed services stay downSet restart actions with sc.exe failure
Assuming activation errors are licensingMissed DNS, firewall or time issuesCheck SRV record, port 1688 and time first

Interview questions

Click a question to open it. Each one is worded the way an interviewer would ask it, and underneath you’ll see why they ask and one way you could answer in your own words.

Fresher level

1. A service won’t start on a server. Where do you look first?

Why they ask this: They want to see you go to the evidence first instead of trying random fixes.

How you might answer: I open the System log and look for Service Control Manager events like 7000, 7001, 7009 and 7038. The message usually carries an error code, and that code tells me where to go next.

2. Can you explain the different service start types in simple words?

Why they ask this: They’re checking you understand the basics of how and when services start.

How you might answer: Automatic means it starts at boot, and Automatic (Delayed Start) means it starts a little after boot so it doesn’t slow startup down. Manual means it only starts when something needs it or triggers it, and Disabled means it never starts.

3. A service fails to start with error 1069. What does that tell you?

Why they ask this: They want to see you know the common service error codes and what to check for each one.

How you might answer: Error 1069 means the service couldn’t log on, so either the password stored on the service is wrong or the account hasn’t got the “Log on as a service” right. I’d check the password first and then the user rights.

2–5 years experience

4. A service broke right after someone changed its account password. How would you fix it so it doesn’t happen again?

Why they ask this: They want to see you fix the problem for good and not only for today.

How you might answer: First I’d update the password on the service so it starts again, which fixes today’s problem. Then I’d move the service to a gMSA, so Windows rotates the password itself and nobody has to remember to update it.

5. One svchost process is using a lot of CPU. How would you find out which services are inside it?

Why they ask this: They want to know you can trace a process back to the services running inside it.

How you might answer: I’d run tasklist /svc, which lists the services in each process, or in PowerShell I’d query Win32_Service, read the ProcessId and filter by that PID. Once I know which services are in there, I can work out which one is causing the load.

6. Windows activation fails with 0xC004F074. How would you troubleshoot it?

Why they ask this: They want to see you understand how KMS activation works and what can break it.

How you might answer: That error means the client couldn’t reach a KMS host. I’d check the KMS host and the sppsvc service on it, test port 1688 with Test-NetConnection, and look at the _vlmcs._tcp SRV record in DNS and the time on both machines. Then I’d retry with slmgr /ato.

Senior level

7. A service works fine when you start it by hand, but fails every time the server restarts. What do you suspect?

Why they ask this: They want to see you think about timing and what else is starting at the same moment.

How you might answer: I’d suspect something that isn’t ready yet at boot, like network storage, the network itself or another service. I’d read the event times in order to see what started when, and then add a service dependency or switch the service to delayed start.

8. Say you find hundreds of service accounts with old passwords and no owners. How would you clean this up across the company?

Why they ask this: They want to see you think at scale about security and day-to-day running.

How you might answer: I’d move to gMSAs wherever I could, set a naming standard and give each account only the rights it needs. I’d keep an inventory of the accounts and their SPNs, and monitor for event 7038 and for 4625 failures coming from service accounts.

9. How would you make a critical service recover by itself if it crashes at night?

Why they ask this: They want to see you plan for failure and still chase the root cause.

How you might answer: I’d set recovery actions on the service, restart on the first failure, restart again on the second, then run a script or restart the server, and I’d alert on events 7031 and 7034 so we know it happened. Recovery actions keep users working, but I’d still go and find the root cause.

Quick quiz

Q1. Which event shows a dependency failed to start?

  1. 7001
  2. 7040
  3. 4624
Show answer

A — It names the dependency.

Q2. What does event 7009 mean?

  1. Wrong password
  2. A timeout waiting for the service
  3. Service deleted
Show answer

B — The default wait is 30 seconds.

Q3. Which command shows a service’s account and dependencies?

  1. sc.exe qc
  2. ipconfig
  3. gpresult
Show answer

A — Or Win32_Service.

Q4. What does 0xC004F074 mean?

  1. Key blocked
  2. No KMS host could be contacted
  3. Count too low
Show answer

B — Check DNS, port 1688 and time.

Q5. In the work story, why did the database fail after restarts?

  1. Wrong password
  2. It started before its iSCSI disk was online
  3. Disk full
Show answer

B — A dependency fixed it.

Quick recap

  • Windows service troubleshooting looks at the account, dependencies, start type and timing.
  • Service Control Manager events 7000, 7001, 7009, 7038 and 7031 tell you what went wrong.
  • sc.exe qc, Get-Service -RequiredServices and tasklist /svc show config and processes.
  • Check what depends on a service before you disable it.
  • For 0xC004F074, check the KMS host, port 1688, the _vlmcs SRV record and time.

Next lesson

Lesson 51: Cluster and Hyper-V troubleshooting → Next you’ll read cluster logs, fix failed resources and quorum problems, and sort out VMs that won’t start or won’t move.

Further reading: Windows service troubleshooting

Want to go deeper into Windows service troubleshooting? Microsoft’s 0xC004F074 guide walks through KMS checks, and the activation error codes list explains the other common codes. You can also see the full plan for this course on the Windows Server Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.