Windows slow boot: diagnose and fix it from the command line

A step-by-step CLI guide to finding out why Windows starts slowly — boot config, event log errors, startup bloat — and the fixes that actually help.

WindowsbootwmicmdbcdeditDiagnosticsevent-logMedium risk
First inspect your boot configuration with bcdedit /enum to check for a long menu timeout or unusual boot settings.

What this covers

A slow boot usually comes down to three things: the boot configuration itself, services that fail or hang during startup, and the pile of programs and services set to launch automatically. This guide walks you through diagnosing each from the command line, applying the fixes that match what you find, and verifying with a timed reboot.

Symptom

?The Windows logo or spinner hangs noticeably longer than it used to, the login desktop takes minutes to become responsive, or the machine sits at the boot menu before Windows even starts loading.

Inspect the boot configuration first

Slow boot is often a boot-configuration problem: a long menu timeout, extra loader entries, or leftover debugging settings. Read the BCD store before changing anything so you know what your baseline looks like. You're looking for an unexpectedly large timeout value under the Windows Boot Manager, duplicate loader entries, or unusual flags. If nothing looks wrong here, the delay is happening after the boot manager hands off to Windows.

Read the BCD store's boot manager and loader entries before making any boot changes.

Command
$ bcdedit /enum

Check the System event log for boot-time errors

Services that fail or time out during startup are a classic cause of a slow boot — Windows waits for each one before continuing. Pull the 20 most recent errors from the System log and look for entries timestamped around your last boot, especially service timeouts or disk-related errors. Recurring errors here point you at the specific component that is stalling startup.

Query the System or Application log for errors, newest first, without opening Event Viewer.

Command
$ wevtutil qe System /q:"*[System[(Level=2)]]" /c:20 /rd:true /f:text

List the programs that launch at startup

Autostart entries from Run keys and Startup folders all compete for disk and CPU during logon, which is often perceived as 'slow boot'. Enumerate everything that launches automatically and look for anything you don't recognize or no longer need — old updaters, vendor bloatware, leftover uninstallers. Seeing the full list tells you whether logon bloat is the problem.

Enumerate autostart entries from Run keys and Startup folders — a forgotten WMI class for spotting unwanted startup software.

Command
$ Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, Location, User | Format-Table -AutoSize -Wrap

Count the services set to start automatically

Services set to Automatic all start before you reach the desktop, and each one adds delay — especially if one hangs. List every Automatic service with its status and cross-reference it against the errors you found in the event log. A service that is set to Automatic but stuck in 'Starting' is your prime suspect.

Use Get-Service filtered on StartType to see every service set to Automatic.

Command
$ Get-Service | Where-Object StartType -eq Automatic | Select-Object Name, DisplayName, Status

Shorten the boot menu timeout

If your bcdedit /enum output showed a large timeout, every boot is silently wasting those seconds at the boot menu even on a single-OS machine. Reduce it to 5 seconds so startup moves on quickly. To undo, restore the default with the provided undo command. Skip this step if your timeout was already short.

Shorten or lengthen how long Windows shows the dual-boot / recovery menu at startup using bcdedit /timeout.

Command
$ bcdedit /timeout 5
▾ Undo
Undo
$ bcdedit /timeout 30

Install pending Windows updates

Pending updates can make every boot slower: Windows may apply or retry them at startup, and outdated drivers or servicing-stack bugs are common boot-performance culprits. Search for, install, and reboot into all available updates from PowerShell. When the machine reboots cleanly into a fully patched state, this common cause is ruled out.

Search, download, install, and reboot into updates without opening Settings — ideal for RDP sessions and scripting.

Command
$ Install-Module PSWindowsUpdate -Force
Get-WindowsUpdate
Install-WindowsUpdate -AcceptAll -AutoReboot

Reboot and measure the new boot time

The only honest verification is a timed reboot. Restart the machine, then check the last boot timestamp and uptime — combined with the clock on your watch or phone, this tells you whether startup is now faster than your original baseline. If the boot is still slow, revisit the event-log errors: the stalling component should now appear with a clearer trace.

Get Windows uptime and last boot timestamp using PowerShell's Get-CimInstance with Win32_OperatingSystem, the modern replacement for the deprecated wmic.

Command
$ $os = Get-CimInstance Win32_OperatingSystem
$os.LastBootUpTime
(Get-Date) - $os.LastBootUpTime
!Commands that modify the Boot Configuration Data (bcdedit /set, /timeout) can make the system unbootable if typed incorrectly. Always run bcdedit /enum first to record your current settings, and use the documented undo command if anything misbehaves.

How to confirm it worked

After applying fixes, restart and time the boot. Check the last boot timestamp and uptime to compare against your baseline — startup should be measurably faster and the System event log should show no new boot-time errors.

Undo everything

Every command above can be reverted. Run these in order to undo all of it.

Undo everything
$ bcdedit /timeout 30

Review before running — some steps may not be independent.

Sources

  • bcdedit - Windows Commands
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents bcdedit, including /enum which lists entries in the Boot Configuration Data store, and the warning to run elevated.
  • wevtutil - Windows Commands
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents wevtutil, including the query-events (qe) command with /q XPath filter, /c count, /rd reverse direction and /f text format.
  • Win32_StartupCommand class
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Describes the Name, Command, Location, and User properties of startup entries.
  • Get-Service
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Get-Service returns ServiceController objects for all services (no arguments = every service), which can be piped to Where-Object for filtering by properties such as Status.
  • ServiceController.StartType Property
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents the StartType property of ServiceController objects (the type returned by Get-Service) and the ServiceStartType enumeration values Automatic, Manual and Disabled.
  • BCDEdit - Boot Configuration Data - SS64
    SS64 · community · 2026-09-17
    Evidence: Documents the /timeout option that controls the boot menu wait time in seconds.
  • PSWindowsUpdate
    PowerShell Gallery · community · 2026-09-17
    Evidence: Module page documenting Get-WindowsUpdate and Install-WindowsUpdate cmdlets built on the Windows Update Agent API.
  • Get-CimInstance - SS64
    SS64 · technical · 2026-09-17
    Evidence: Get-CimInstance retrieves WMI/CIM class instances and supports date conversion of CIM timestamps.

Last verified: 2026-09-21

Related guides