sodcalculator

10 Tech How-To

0x80070308 Error Enabling Windows Features: Fix

Guide 10-47251 · Updated · Step by step

Error code 0x80070308 appears when you try to enable a Windows feature (like .NET Framework, Hyper-V, or Windows Subsystem for Linux) and the operation fails partway through. The fix is to repair the Windows component store and then retry the feature installation, usually with a DISM command followed by a system file check.

What This Error Actually Means

Windows features are optional components stored in the component store (C:\Windows\WinSxS). When you enable one, Windows copies the needed files from that store into the active system. Error 0x80070308 translates to “ERROR_INVALID_INDEX” — the system could not find or read the component data it needed. In practice, this almost always points to a corrupted or inconsistent component store, not a problem with the feature itself. The error can also appear after a failed Windows update, a disk error, or an interrupted previous feature installation.

Prerequisites and Safety Checks

Before making changes, ensure you have a stable power connection and a recent backup of important files. The commands below modify core Windows files; while they are safe when run as intended, a power loss mid-operation can cause issues. You will need an administrator account. If your PC is part of a managed network (work or school), contact your IT administrator before running system-level repairs — group policies may block these commands.

Step-by-Step Fix

Run these commands in order. Open Command Prompt as Administrator (search for “cmd”, right-click, select “Run as administrator”).

  1. Run DISM to repair the component store. Type: DISM /Online /Cleanup-Image /RestoreHealth and press Enter. This can take 15-30 minutes. It checks the component store and fixes corruption using Windows Update as the source.
  2. Run System File Checker. After DISM completes, type sfc /scannow and press Enter. This verifies and repairs protected system files. It may take 10-20 minutes.
  3. Restart your PC. Reboot even if both tools reported no issues.
  4. Try enabling the feature again. Go to Settings > Apps > Optional Features > More Windows Features (or Control Panel > Programs > Turn Windows features on or off). Check the feature you wanted, click OK, and let it finish.

If the Error Persists

If the error returns after the DISM and SFC cycle, the component store may be damaged beyond online repair. Try these in order:

  • Use DISM with a known-good source. If you have a Windows installation ISO or USB, run: DISM /Online /Cleanup-Image /RestoreHealth /Source:D:\Sources\install.wim /LimitAccess (replace D: with the drive letter of your media). This bypasses Windows Update if the update service itself is corrupt.
  • Check disk errors. Run chkdsk C: /f in an admin Command Prompt, then restart. This scans for bad sectors and file system errors that could cause the component store to fail.
  • Perform an in-place upgrade repair. Download the Windows 11 or Windows 10 installation assistant from Microsoft’s official site, run it, and choose “Keep personal files and apps”. This reinstalls Windows while preserving your data and settings, and it repairs the component store.
  • As a last resort, reset this PC. Settings > System > Recovery > Reset PC. Choose “Keep my files” to retain personal data but remove installed apps, or “Remove everything” for a clean slate. Back up your files first.

Why DISM and SFC Fix It

DISM (Deployment Image Servicing and Management) is the official tool for repairing the Windows system image. The /RestoreHealth option scans the component store for corruption and replaces damaged files with good copies from Windows Update or a specified source. SFC (System File Checker) then checks the integrity of all protected system files and replaces any that are corrupted. Together, they address the two most common causes of error 0x80070308: a broken component store and a corrupted system file. Running them in the correct order matters because SFC relies on the component store to source clean files; if the store is broken, SFC may fail or make things worse.

Common Misconceptions

Many users think the error means the feature is incompatible with their edition of Windows. That is rarely the case. The error is about the system’s ability to install the feature, not the feature’s availability. Another misconception is that you need to reinstall Windows immediately. In most cases, the DISM/SFC fix resolves it. Also, some guides suggest manually deleting files from the WinSxS folder — never do that. The component store is managed by Windows and manual deletion will cause more errors.

Prevention for the Future

To reduce the chance of this error recurring, keep Windows Update current, avoid force-shutting down your PC during updates or feature installations, and periodically run DISM /Online /Cleanup-Image /StartComponentCleanup (as administrator) to remove outdated versions of components. This is safe and frees up disk space. Also, ensure your disk has enough free space (at least 10-15 GB) for feature installations to complete.

Frequently Asked Questions

Will this error damage my computer? No, the error itself is harmless — it just stops the feature installation. The underlying corruption, if left unaddressed, could cause other issues over time, but the error itself does not damage hardware or data.

Can I fix this without admin rights? No, both DISM and SFC require administrator privileges. If you don’t have admin access, contact your IT department or the person who manages your PC.

How long does the DISM command take? Typically 15-30 minutes, but it can take longer on older or slower systems. Let it finish; do not close the Command Prompt window or restart during the process.

What if DISM says “source files not found”? This means Windows Update could not provide the needed files. Use the /Source option with a Windows installation media as shown above, or run the in-place upgrade repair.

Is this error related to a specific Windows version? It can appear on Windows 10 and Windows 11, and also on Windows Server. The fix steps are the same for all current versions.

After the fix, do I need to reinstall the feature that failed? Yes, you will need to go back to the Windows Features dialog and enable it again. The repair tools only fix the system, they don’t automatically complete the failed installation.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →