0

My installation of WSL fails with error 0x800f0831 when I try it either via powershell or via enable optional features.

Windows 1809, build 17763.678

PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature : Enable-WindowsOptionalFeature failed. Error code = 0x800f0831
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

I've run the following commands as suggested by some technet articles, but to no avail:

sfc /scannow
dism.exe /Online /Cleanup-image /Scanhealth
dism.exe /Online /Cleanup-image /Restorehealth
sc config wuauserv start=disabled 
net stop bits
net stop appidsvc
net stop cryptsvc
net stop wuauserv
net stop wuauserv
rd /q /s %Systemroot%\SoftwareDistribution
rd /q /s %Systemroot%\system32\catroot2
del %Systemroot%\WindowsUpdate.log
sc config wuauserv start=auto  
wuauclt /resetauthorization /detectnow

Any thoughts on how to move forward with this?

  • The best working solution for 3 years is -- reinstall Windows 10 OS. – Biswapriyo Sep 4 at 18:51
  • I was hoping to avoid this... – Simon Fredriksson Sep 4 at 19:26
  • Have you tried using the GUI? In Add/Remove Windows Features? – Carlos Rafael Ramirez Sep 5 at 15:18
  • @CarlosRafaelRamirez, yes -- same error. – Simon Fredriksson Sep 7 at 16:12
  • 1
    @CarlosRafaelRamirez you're absolutely right. I upgraded to 1903 and then the installation process went through without any issues. Thanks! – Simon Fredriksson Sep 10 at 23:40
1

Upgraded Windows 10 from version 1809 to 1903 solved this issue as suggested by CarlosRafaelRamirez in the comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.