'PowerShell' is not recognized as an internal or external command 'PowerShell' is not recognized as an internal or external command powershell powershell

'PowerShell' is not recognized as an internal or external command


This can happen if a program is not on your PATH. Open a PowerShell prompt andenter

[environment]::setEnvironmentVariable('PATH',"$env:path;C:\Windows\System32\WindowsPowerShell\v1.0", 'm')

then restart PowerShell.


I found this helpful.

  • Write cmd in the start menu, right-click and run as administrator.
  • Then in the cmd, paste in this to install choco

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin


Put Chocolatey on the path.

Edit the system environmental variable. Go to

System PropertiesAdvancedEnvironment VariablesSystem variablesPATHEditNew

Look for where Chocolatey is. In my case it was at C:\ProgramData\chocolatey.Enter that, don't forget to put "\" after Chocolatey. I.e., it should be:C:\ProgramData\chocolatey\