Troubleshooting Windows
A method for finding out what is really wrong, how Windows starts and where it breaks, the tools that are already built in, the usual symptoms with the first things to check, and when it is time to stop repairing and reinstall.
Open in the interactive Digital Garden
| What You Need |
|---|
| A second device, a phone or another computer, so that you can look things up while the broken one is broken |
| A USB stick of 8 GB or more with the Windows installation and recovery media on it. Make it before you need it, from the official Microsoft page, on any working computer |
| An administrator account on the machine, and the password of the Microsoft account that is tied to it. If the disk is encrypted with BitLocker, also the recovery key (see below) |
| Somewhere to copy your files to: an external disk, another computer, a cloud folder |
| A text file or a notebook for notes, and an hour or two without interruptions |
Jump to the Examples
Disclaimer: Should you decide to act upon any information on this website, you do so at your own risk! Commands such as chkdsk, diskpart and bootrec, and anything that edits the registry or the boot files, can turn a computer that is merely sick into one that is dead, and a "Reset this PC" can erase your files. Back up first, read what a command does before you press Enter, and do not paste commands from a forum post or a video that you cannot explain to somebody else.
Most Windows problems are boring. A driver that was updated last week, a disk that is almost full, an update that stopped halfway, a program in the startup list that nobody remembers installing. The hard part is rarely the repair itself. It is working out which of the twenty possible causes is yours, and not making things worse while you look. This note is about that order of work, and about the tools and commands I would reach for. It is written for Windows 11, but nearly all of it applies to Windows 10 too, only the menus have other names.
Some of the topics continue in other notes: old computers that Windows has given up on in Reviving an Old Computer, backups, malware and scams in Security Considerations, the terminal in Communication with the Machines, and what to do when it is the network and not the computer in Computer Networks. The same approach for the other big family of systems is in Troubleshooting Linux.
A Method Before the Tools
The tools are the easy part, and every guide on the Internet lists them. What separates a quick repair from a lost weekend is what you do before you open any of them.
- Describe the problem exactly. "It is slow" is not a symptom, "it is slow for two minutes after I sign in and then it is fine" is. If there is an error screen, photograph it with your phone. The error code or the stop code is the most useful thing you will have, and it is gone after the next restart.
- Ask what changed. A new driver, an update, a program, a new device, a power cut, a cable that somebody moved. Most problems start with a change, and Reliability Monitor (below) keeps a timeline of exactly those.
- Save your data before you repair anything. Not after. The repair tools are mostly safe, but "mostly" is a poor word when it is the only copy of the photographs.
- Change one thing at a time and test after each change. If you change five things and the problem disappears, you have learned nothing, and you cannot undo it either.
- Begin with the cheap and reversible. A restart, unplugging the USB devices, Safe Mode, a restore point. The commands that rewrite things come later.
- Keep notes. A line for each step: what you did, what happened. It sounds fussy, but at one in the morning you will not remember whether you already ran chkdsk.
- Know when to stop. Sometimes the honest answer is a reinstall. See the last practical section.
How Windows Starts, and Where It Breaks
Half of the diagnosis is knowing how far the computer gets. A machine that never shows the manufacturer's logo has a different problem than one that reaches the sign-in screen and then freezes, even if both are described as "it does not start". The boot is a chain, and every link hands over to the next one.
Power on
|
[ Firmware (UEFI / BIOS) ] tests the hardware, finds a boot device
|
[ Boot manager (bootmgr) ] reads the boot configuration (BCD)
|
[ Windows loader (winload) ] loads the kernel and the boot drivers
|
[ Kernel, drivers, services ] most blue screens at start-up happen here
|
[ Sign-in screen ] user profile, start-up programs
|
[ Desktop (explorer.exe) ]
Where it stops, and where I would look first (my own rules of thumb, not a complete list):
| Stops at | What you see | Usual suspects | First move |
|---|---|---|---|
| Firmware | Nothing on the screen, beeps, "No bootable device" | A disk that is dead or unplugged, a changed boot order, a firmware setting that was reset, failing RAM | Check that the firmware lists the disk at all. Reseat the RAM and the disk cables. Check the boot order. |
| Boot manager or loader | "Your PC needs to be repaired", error codes such as 0xc000000f, a black screen with a cursor | Damaged boot files or boot configuration, often after a disk change, a cloning, or a second operating system | Recovery environment, Startup Repair, then rebuilding the boot files (Example 4) |
| Kernel and drivers | A blue screen near the logo, a restart loop, INACCESSIBLE_BOOT_DEVICE | A new driver or update, a changed storage mode in the firmware (AHCI or RAID), a failing disk | Safe Mode, uninstall the latest update or driver, check the disk health |
| Sign-in | A spinning circle after the password, "User Profile Service failed", a temporary profile | A damaged profile, a full disk, an update that did not finish | Safe Mode, another administrator account, free some space |
| Desktop | Slow, a black screen with a cursor, a missing taskbar, programs that crash | Start-up programs, shell extensions, malware, too little memory | Task Manager, the start-up list, a clean boot |
The Tools Already Inside Windows
You do not need to install anything to start. Windows ships with a surprisingly good set of diagnostic tools, and they know the machine better than any third-party "optimizer" does. For the commands below, open a terminal as administrator: right-click the Start button and choose Terminal (Admin). The basics of the command line are in Communication with the Machines.
What is there and what it tells you:
| Tool | What it is good for | How to open it |
|---|---|---|
| Task Manager | Who is using the processor, memory, disk and network right now, and which programs start with Windows | Ctrl + Shift + Esc |
| Resource Monitor | The detailed view: which process is reading which file, how long the disk queue is | Win + R, then resmon |
| Event Viewer | The log of everything. Errors and warnings with times, the name of the crashing module, driver failures | Win + R, then eventvwr (Windows Logs, System and Application) |
| Reliability Monitor | A timeline of crashes, failed updates and installations with a stability index. The quickest way to answer "what changed" | Win + R, then perfmon /rel |
| Device Manager | Devices with a yellow triangle, driver versions, and the button to roll a driver back | Win + X, then Device Manager, or devmgmt.msc |
| Windows Security | Microsoft Defender, including the offline scan that runs before Windows starts | Start, then Windows Security |
| Safe Mode | Starts with a minimum of drivers and services. If the problem is gone there, a driver or a program is the cause | Settings, System, Recovery, Advanced startup, Restart now, then Troubleshoot, Advanced options, Startup Settings |
| System Restore | Goes back to an earlier restore point: drivers, settings, installed programs. Not your documents | Win + R, then rstrui |
| Memory Diagnostic | A quick test of the RAM (it restarts the computer). For a serious test use a bootable MemTest86 | Win + R, then mdsched |
| sfc, DISM, chkdsk | Repair of the system files, of the component store and of the file system | Terminal (Admin), see the examples |
| Sysinternals | Free Microsoft tools for the deep end: Process Explorer, Autoruns, Process Monitor | learn.microsoft.com/sysinternals |
| Reset this PC | Reinstalls Windows and keeps or removes your files. The last resort that is still built in | Settings, System, Recovery |
Safe Mode deserves one more sentence. If you cannot get to the settings because Windows does not start, interrupt the start-up by switching the computer off while the logo is spinning. After two or three failed starts Windows opens the recovery environment by itself, and the same menu (Troubleshoot, Advanced options) is there. If even that fails, boot from the USB stick and choose Repair your computer.
Common Symptoms and the First Things to Check
The table is only a starting point. Each row says what I would look at first, and what comes next if the first look shows nothing. The numbered examples after it go through the steps in detail.
Symptoms, first checks and the next step:
| Symptom | First checks | If that does not help |
|---|---|---|
| The computer is slow | Task Manager: what is at the top of the CPU, memory and disk columns? How much free space is on drive C:? What is in the start-up list? | Disk health, an offline Defender scan, temperatures (a dusty cooler makes the processor slow itself down), Example 1 |
| "Disk 100%" | Almost always a mechanical hard disk that is doing an update, an indexing run and a virus scan at the same time. Wait ten minutes and look again | Replace the hard disk with an SSD. Nothing else you can do for the same money makes the machine so much faster. For old machines see Reviving an Old Computer |
| A blue screen | Photograph the stop code. What changed just before? Does it happen under load or at random? | Reliability Monitor, the dump file, a RAM test, switching off XMP or any overclock (Example 5) |
| An update fails or hangs | Free space (at least 10 GB), a restart, the Windows Update troubleshooter, the error code | DISM and sfc (Example 2), then resetting the update components (Example 6) |
| No Internet | Is it only this computer? Do the other devices on the same network work? Did the router restart? | ipconfig, DNS flush, network reset (Example 3), and Computer Networks |
| No sound | Is the right output device selected? Is the volume mixer muted for the one program? | Roll the audio driver back in Device Manager, the audio troubleshooter, switch off the sound "enhancements" |
| A program keeps crashing | Event Viewer, Windows Logs, Application: the Faulting module name tells you if it is the program or something it loads | Repair or reinstall the program, update the graphics driver, try a clean boot |
| It will not sleep, or wakes by itself | In the terminal: powercfg /requests and powercfg /lastwake | The network card and USB devices are the usual culprits. Switch off "Allow this device to wake the computer" in Device Manager |
| The printer does not print | Is it on the same network? Restart the Print Spooler service (services.msc) | Remove the printer and add it again, with the driver from the manufacturer's page and not the generic one |
| A pop-up says "Your computer is infected", or somebody calls | Stop. Do not call the number, do not install anything, do not give anyone remote access. Nobody from Microsoft rings you | Disconnect from the network, run the offline Defender scan, change the passwords from another device. More in Security Considerations |
A Note on BitLocker
Many new laptops, especially with Windows 11 Home, turn on device encryption the moment you sign in with a Microsoft account, and nobody is told. It is a good thing until the day you change the firmware settings, replace the motherboard, or boot from a USB stick, and Windows asks for a 48-digit recovery key. Without that key the data is gone, and that is by design. The key is stored with your Microsoft account (account.microsoft.com/devices/recoverykey) or the work or school account. Look at it today, from another device, and copy it into your password manager.
Examples: Step by Step
Each example is the order in which I would try things, not the only possible one. Stop as soon as the problem is solved, and write down what worked.
Example 1: The Computer Has Become Slow
- Open Task Manager (Ctrl + Shift + Esc). Click the columns CPU, Memory and Disk to sort. One program using everything is a very different story from everything being slightly busy.
- Open the Startup apps tab and switch off what you do not need at sign-in. Leave the security software and the drivers of your devices alone. If you are not sure what an item does, search for its name before you switch it off.
- Check the free space on drive C:. Windows needs room to work: when it is under about 10 to 15 percent, everything gets slower, and updates fail. Settings, System, Storage shows what is taking the space, and Temporary files is a safe place to start.
- Check that the disk is healthy. In PowerShell:
Get-PhysicalDisk | Format-Table FriendlyName, MediaType, HealthStatus. A second opinion on the SMART values comes from a free program like CrystalDiskInfo. If the disk reports problems, copy your data first, and do not run long repair scans on a dying disk. - Run the offline scan: Windows Security, Virus & threat protection, Scan options, Microsoft Defender Antivirus (offline scan). The computer restarts and scans before Windows starts.
- Look at the temperatures with a program like HWiNFO. A laptop that is at 95 degrees under a light load has a clogged cooler or dried thermal paste, and the processor slows itself down to survive. Compressed air helps more often than people expect.
- If the system drive is still a mechanical hard disk, this is where the advice stops being about software.
Example 2: Repairing the System Files
Windows keeps a protected copy of its own files, and two tools compare the running system with it. DISM repairs the copy (the component store), sfc repairs the running files from the copy. If the copy itself is damaged, sfc cannot repair anything, so the usual order is DISM first. Both need an elevated terminal, and both take a while. A percentage that sits at 20 or 62 for several minutes is normal.
DISM /Online /Cleanup-Image /RestoreHealth sfc /scannow
Restart afterwards and run sfc /scannow once more. If it still reports files that it could not repair, the details are in C:\Windows\Logs\CBS\CBS.log, which is long and ugly, but searching it for the word corrupt tells you which files. If both tools finish cleanly and the problem remains, the cause is probably not in the system files, and it is time to look at the drivers, the disk and the hardware.
A similar check for the file system: chkdsk C: /scan scans while Windows is running and changes nothing. chkdsk C: /f fixes errors, and for the system drive it asks to run at the next restart. The option /r also looks for bad sectors and is very slow, so use it only when you have a reason to suspect the surface of a hard disk, and have a backup.
Example 3: The Network Does Not Work
The method is a ladder: go up one step at a time, and the first step that fails shows you where the problem is. The background (addresses, DNS, gateways) is in Computer Networks. Run these in the terminal:
ipconfig /all # does the computer have an address, a gateway, a DNS server? ping 192.168.1.1 # the router (use your own gateway address from the line above) ping 1.1.1.1 # the Internet, by address, no DNS needed ping example.org # the Internet, by name, DNS needed
- No address, or an address starting with 169.254: the computer did not get one from the router. Check the cable and the Wi-Fi, restart the router, and then the network adapter.
- The router answers, the address does not: the problem is the Internet connection of the router itself, not your computer.
- The address answers, the name does not: DNS. Try
ipconfig /flushdns, and if that is not enough, change the DNS server of the adapter to a different one. - Nothing helps and only this computer is affected: reset the network stack, then restart.
netsh winsock reset netsh int ip reset
The same thing with a button is Settings, Network & Internet, Advanced network settings, Network reset. It removes and reinstalls all the network adapters and forgets the saved Wi-Fi passwords and VPN settings, so have them at hand. A VPN client or a "security suite" that installed its own network driver is a more frequent cause than people think; if the problem started with its installation, remove it first.
Example 4: Windows Will Not Start
Before anything else: is the disk visible in the firmware setup? If it is not, no software step will help, and the cable, the connector or the disk itself is the problem. If it is visible, boot from the USB stick (the key for the boot menu is usually F12, F10, F9, Esc or F2, depending on the manufacturer), choose your language, and click Repair your computer in the lower left corner. If the disk is encrypted, keep the recovery key at hand.
Under Troubleshoot, Advanced options try them in this order, and restart to test after each one:
- Startup Repair. It fails often, but it costs nothing.
- Uninstall Updates (the latest quality update, then the feature update), if the problem began after an update.
- System Restore, if there is a restore point from before the trouble.
- Command Prompt, for rebuilding the boot files by hand (below).
In the recovery command prompt the drive letters are often not the same as in Windows, so first find out which is which. On a modern computer (UEFI, GPT disk) the boot files live on a small FAT32 partition of about 100 to 500 MB, and the commands look like this:
diskpart list volume # find the Windows volume and the small FAT32 one select volume 3 # the number of the FAT32 (EFI) volume assign letter=S exit bcdboot D:\Windows /s S: /f UEFI # D: is the Windows volume that you found above
bcdboot writes fresh boot files from the installed Windows. On older computers with a BIOS and an MBR disk the classic way is bootrec /fixmbr, bootrec /fixboot and bootrec /rebuildbcd. On a UEFI computer bootrec /fixboot often answers "Access is denied", which is the reason why bcdboot is the better tool there. If the file system is damaged, chkdsk D: /f from the same prompt is also possible. The offline version of sfc is sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows.
If all of this fails, and the disk is healthy, do not spend the evening on it. Boot from the USB stick, copy the files to an external disk (type notepad in the recovery command prompt, choose File, Open, and you have a rough file browser in which you can copy files to the external disk with a right click), and read the section on reinstalling.
Example 5: Blue Screens
A blue screen is Windows stopping on purpose because continuing could damage data. It shows a stop code in capital letters (for example CRITICAL_PROCESS_DIED, IRQL_NOT_LESS_OR_EQUAL, PAGE_FAULT_IN_NONPAGED_AREA, WHEA_UNCORRECTABLE_ERROR) and sometimes the name of a file. One blue screen in a year is a curiosity. Several in a week are a symptom.
- Write down the stop code and the file name, and note what you were doing. The bug check reference from Microsoft explains the codes.
- Think about what changed. A new graphics, network or storage driver is the most common reason. In Device Manager open the device, then Driver, Roll Back Driver, or uninstall the update in Settings, Windows Update, Update history.
- Read the dump file. Windows saves a small one in
C:\Windows\Minidumpand a large one asC:\Windows\MEMORY.DMP. A free program like BlueScreenView lists the drivers involved. WinDbg from the Microsoft Store, with the command!analyze -v, gives the more serious analysis. - Test the memory. Bad RAM looks like everything else: random stop codes, programs that crash for no reason, files that become damaged. Run MemTest86 for at least a few passes. If you enabled XMP or EXPO (the memory profile) or overclocked anything in the firmware, switch it off for a week and see.
- Check the disk and the temperatures, as in Example 1. A blue screen only under a heavy load, like a game, points to the graphics card, the power supply or heat.
- If the codes keep changing from one blue screen to another, I would suspect the hardware, and memory in particular, rather than Windows.
Example 6: Windows Update Is Stuck
First the quiet steps: free space on C:, a restart, the troubleshooter (Settings, System, Troubleshoot, Other troubleshooters, Windows Update), and the DISM and sfc pair from Example 2. Look up the error code of the failed update, because the same few codes account for most cases. If that is not enough, the widely used trick is to let Windows rebuild its download cache. It is safe, because Windows creates the folder again, but it belongs after the simple steps and not before:
net stop wuauserv net stop bits ren C:\Windows\SoftwareDistribution SoftwareDistribution.old net start wuauserv net start bits
Then check for updates again. The old folder can be deleted after a week, when everything works.
When to Stop Repairing
There is a point where a repair costs more than a reinstall, and a good sign is that you start repeating yourself. The same system files are damaged again after you repaired them. A fix that worked last month is needed again. The computer behaves differently in Safe Mode, in a new user account and with a new profile, and you still cannot find the reason. Windows that has lived on one computer for six years, through three major versions, a few antivirus programs and dozens of drivers, is allowed to be tired.
The options, from the gentlest to the most thorough:
| Option | What it keeps | When I would use it |
|---|---|---|
Repair install (run setup.exe from a Windows ISO or the USB stick while Windows is running, and choose to keep files and apps) | Files, apps and settings | Windows still starts, but the system files are damaged and sfc and DISM cannot fix them. It is the most under-used step, and it saves the most work. The ISO must match the installed version and language |
| Reset this PC, keep my files | Personal files. Apps and settings are removed | Windows is in a poor state but you want to keep your documents. Still make a backup |
| Reset this PC, remove everything | Nothing | Malware that you cannot get rid of, or before you give the computer to somebody else |
| Clean install from the USB stick | Nothing, and you choose the partitions | A new or replaced disk, deep damage, or when you want a system without the manufacturer's extra software |
Some practical details that cost people their evening. Download the network driver of the computer on another device before you reinstall, because a fresh Windows without a network driver cannot download anything else. Modern Windows 10 and 11 licences are normally linked to the hardware and activate by themselves, and you do not need to type a key, but sign in with the same Microsoft account afterwards. Know where your applications' licence keys and installers are before you wipe anything. And if the computer is old enough that Windows 11 will not install on it, the alternative of a different operating system is in Reviving an Old Computer.
Making It Less Likely Next Time
- Back up, and try the restore once. A backup that has never been restored is a hope. Keep one copy that is not connected to the computer all the time, because ransomware encrypts every drive it can see. The 3-2-1 rule is in Security Considerations.
- Make the recovery USB stick now, and copy the BitLocker recovery key to the password manager. The stick has to be made on a working computer, and you will not have one when you need it.
- Leave System Protection on for drive C: (search for "Create a restore point"), so that Windows makes restore points before installing drivers and updates.
- Keep some free space on the system drive, at least 15 percent.
- Do not use registry cleaners, "PC optimizers" or driver updater programs. They do not make anything faster, they are a frequent source of the very problems they claim to fix, and some of them are malware. Drivers come from Windows Update or from the manufacturer of the hardware.
- Uninstall what you do not use, especially programs that add themselves to the start-up and to the context menu.
- Use a standard account for everyday work and an administrator account only when you install something. Most malware needs the administrator rights that you click through.
- Keep the updates on. It annoys people, but unpatched Windows is the more expensive problem. If you cannot afford a surprise (before a presentation, for example), pause them for a week, but not for a year.
- Watch the hardware. Dust, temperature, the SMART values of the disk, and the odd noise that a mechanical disk makes before it dies.
Some resources:
- Microsoft – Windows help and learning
- Windows release health – known issues of each update
- sfc – command reference and repairing a Windows image with DISM
- bcdboot – command-line options
- Bug check code reference (stop codes)
- Sysinternals, MemTest86, HWiNFO, CrystalDiskInfo, BlueScreenView
- Download Windows 11 – installation media and ISO
A Few More Thoughts
I notice that the dull advice does most of the work: look before you touch, change one thing, keep a copy. The clever commands are for the rare evening when the dull advice has been used up. Troubleshooting is also a skill that grows with repetition. After the third time that a blue screen turns out to be a graphics driver, you stop being afraid of blue screens, and the one after that takes ten minutes.
It is also worth saying that "Windows is broken" is sometimes true and not your fault. Updates do go wrong, and the release health page above exists for that reason. Before you spend an evening on your own machine, a quick search for the exact error and the name of the update shows whether thousands of others have the same problem this week. And if you run other machines for the household, a small server or a shared mailbox, the notes Constructing a Cloud and Constructing E-mail describe the other side of the same craft, where you are the one who has to keep it running.