0

I have an error in the PowerShell console with Chocolatey's link.

chocolatey's link error

If have not a solution, I need to learn how to install Chocolatey with the downloaded file "chocolatey.0.10.15.nupkg".

chocolatey's file .nupkg

diazan364
  • 11
  • 4

1 Answers1

0

Installing choco is a very common use case, including NuGet.

PowerShell already comes with a package manager that uses NuGet that it already installs by default. You can still install choco for other reasons, but for every day, normal PowerShell use, it's not needed.

Installing PowerShellGet https://learn.microsoft.com/en-us/powershell/scripting/gallery/installing-psget?view=powershell-7

PowerShellGet is an in-box module in the following releases Windows 10 or newer Windows Server 2016 or newer Windows Management Framework (WMF) 5.0 or newer PowerShell 6

Set your security level in your PowerShell session.

# Required for use with web SSL sites
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

If your ExecutionPolicy is set to AllSigned, then any script you run must be signed. Otherwise, set the ExecutionPolicy to RemoteSigned or ByPass in your user session.

How to Install Chocolatey using PowerShell

Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression (
    (New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')
)
postanote
  • 15,138
  • 2
  • 14
  • 25
  • Thanks for the answer! I have Windows 7 and PowerShell 2.0. I do it your steps but I still have one error. Excepción al llamar a "DownloadString" con los argumentos "1": "Se ha terminado la conexión: Error inesperado de envío." En línea: 1 Carácter: 118 + Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString <<<< ('https://chocolatey.org/install.ps1')) + CategoryInfo: NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException – diazan364 Oct 08 '20 at 09:06
  • If this is your personal machine, upgrade your PS version to PSv5x. PS2 is no longer supported ([depreciated](https://devblogs.microsoft.com/powershell/windows-powershell-2-0-deprecation/)) and really should no longer be used. Also, choco has system requirements.. [Does your system meet the requirements?](https://chocolatey.org/courses/getting-started/requirements) – postanote Oct 08 '20 at 17:36
  • I installed chocolatey by downloading Windows Management Framework 5.1 that include PowerShell 5.1. Thanks you very much!! – diazan364 Oct 11 '20 at 12:37