Reputation: 341
'Set-ExecutionPolicy' is not recognized as an internal or external command, operable program or batch file. getting this error while trying to install chocolaty through cmd
Upvotes: 20
Views: 80347
Reputation: 11
Dont choose command prompt instead of power shell we think that both are same but its not Search Window power shell->run as administrator then run this code
Upvotes: 1
Reputation: 937
Just right click on "powershell" then choose "run as adminstrator"
Upvotes: 2
Reputation: 11
'Set-ExecutionPolicy' is not recognized as an internal or external command, operable program or batch file while installing chocolaty for this question I think you are using command prompt but Set-ExecutionPolicy is a command only for powershell.
Upvotes: 1
Reputation: 371
Set-ExecutionPolicy
is a PowerShell Cmdlet.
You should run it in a PowerShell (Admin-) Session, not in cmd.
Take a look at the installation instructions from chocolatey.org. Official chocolatey documentations is pretty good, as I think:
https://chocolatey.org/install#individual
Upvotes: 35