Getting "The requested operation requires elevation" error while enabling Windows Subsystem for Linux (WSL) in Windows

34363


I'm running the below command to enable Windows Subsystem for Linux (WSL)

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

But, getting the below error

Enable-WindowsOptionalFeature : The requested operation requires elevation.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

Any suggestions?

2 Answers

3 years ago by

I was able to resolve the issue by performing below things:

  1. Check if any windows updates are pending and install them
  2. Make sure you are running Power Shell as "Administrator"

Hope it works for you too!

3 years ago by Divya

your organization may block windows updates

9 months ago by ribok26161