Getting "The requested operation requires elevation" error while enabling Windows Subsystem for Linux (WSL) in Windows
35362
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
4 years ago by Jahaan
I was able to resolve the issue by performing below things:
- Check if any windows updates are pending and install them
- Make sure you are running Power Shell as "Administrator"
Hope it works for you too!
4 years ago by Divya