8

When I try to run Enable-WindowsOptionalFeature windows throws ''Enable-WindowsOptionalFeature' is not recognized as an internal or external command, operable program or batch file.'

I am running windows 10.

There is no environment variable called Enable-WindowsOptionalFeature. Should I add it, and if so, what path should I add?

1
  • 1
    1.The Get-WindowsOptionalFeature cmdlet requires PowerShell 3.0. 2.This cmdlet must run with elevated rights. Right-click the Windows PowerShell 3.0 console while holding the CTRL key, and select Run As Administrator from the action menu
    – daidai
    Jan 1, 2019 at 7:43

1 Answer 1

14

The command you are trying to run cannot be ran in Windows Command Prompt, you need to run it in Windows Powershell.

1
  • I'm running PowerShell Core as an administration and I'm facing the same problem. Is there another possible cause? Dec 7, 2019 at 8:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .