Error message installing Chocolatey in PowerShell
You must start that line from cmd.exe (a "standard" command prompt), not from PowerShell.
In PowerShell v3+ the easiest way is:
Open a PowerShell window (run as administrator)
Check the version of PowerShell is greater than 3:
$PSVersionTable.PSVersion
Enable execution of PowerShell scripts?
set-executionpolicy remotesigned
In PowerShell
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
I was unable to install Chocolatey on my Windows 10 64-bit OS installation. I was getting powershell not recognized as internal or external command
. Finally I found the solution, so to people who ever facing the exact same problem as I did, here is the solution for you.
The reason why you get such an error is because the WindowsPowerShell
path is not set. So kindly set the Path
as
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
Go to Environment variable (see below). You see that Path
variable, click on Edit and you see one more pop-up window, which shows a couple of paths there. Now click on New and copy-paste the above path. Close your CommandPrompt(admin) and open it again. Run the command given by Chocolatey, and now it starts downloading.
Here is a step-by-step guide:
Go to Control Panel → System → Advanced System Settings → Environment Variables → User variable for Users → Select Path Variable → click Edit → Click on New → paste this %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
→ Click OK → you're done.