Manisha
Manisha

Reputation: 341

'Set-ExecutionPolicy' is not recognized as an internal or external command, operable program or batch file while installing chocolaty

'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

Answers (4)

Stephy Antony
Stephy Antony

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

Abdallah Mahmoud
Abdallah Mahmoud

Reputation: 937

Just right click on "powershell" then choose "run as adminstrator"

Upvotes: 2

Vikram Singh
Vikram Singh

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

Malte
Malte

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

Related Questions