# Lỗi khi cài đặt chocolatey

**URL:** https://daynhauhoc.com/t/loi-khi-cai-dat-chocolatey/129706
**Category:** randomq
**Tags:** chocolatey
**Created:** [May 11, 2023, 8:40am UTC](https://daynhauhoc.com/t/loi-khi-cai-dat-chocolatey/129706 "2023-05-11T08:40:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![otaku\_somot](https://daynhauhoc.com/user_avatar/daynhauhoc.com/otaku_somot/32/64038_2.png) [@otaku\_somot](https://daynhauhoc.com/u/otaku_somot)
#### Post date: [May 11, 2023, 8:40am UTC](https://daynhauhoc.com/t/loi-khi-cai-dat-chocolatey/129706/1 "2023-05-11T08:40:04Z")

</div>

em có xem hướng dẫn trên mạng và dùng powershell trên window 7 (đã run as adminstrotor) để tải chocolatey, sau khi paste lệnh Get-ExecutionPolicy vào powershell và kết quả là AllSigned, em paste tiếp lệnh này vào powershell Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘[https://community.chocolatey.org/install.ps1](https://community.chocolatey.org/install.ps1)’))  
và nhận được lỗi như thế này

Exception setting “SecurityProtocol”: “Cannot convert value “3312” to type “System.Net.SecurityProtocolType” due to inv  
alid enumeration values. Specify one of the following enumeration values and try again. The possible enumeration values  
are “Ssl3, Tls”.”  
At line:1 char:85

- Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]:: \<\<\<\< SecurityProtocol = [System.  
Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘[https://co](https://co)  
[mmunity.chocolatey.org/install.ps1](http://mmunity.chocolatey.org/install.ps1)’))
  - CategoryInfo : InvalidOperation: (🙂 [], RuntimeException
  - FullyQualifiedErrorId : PropertyAssignmentException

Exception calling “DownloadString” with “1” argument(s): “The underlying connection was closed: An unexpected error occ  
urred on a send.”  
At line:1 char:219

- Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.Se  
rvicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString \<\<\<\< (‘[https://co](https://co)  
[mmunity.chocolatey.org/install.ps1](http://mmunity.chocolatey.org/install.ps1)’))
  - CategoryInfo : NotSpecified: (🙂 [], MethodInvocationException
  - FullyQualifiedErrorId : DotNetMethodException

đã có thử cách ở trang này [https://stackoverflow.com/questions/62004709/chocolately-get-executionpolicy-uncaught-referenceerror-get-is-not-defined](https://stackoverflow.com/questions/62004709/chocolately-get-executionpolicy-uncaught-referenceerror-get-is-not-defined) nhưng bị lỗi này,

 ![program](https://daynhauhoc.s3.dualstack.ap-southeast-1.amazonaws.com/original/3X/c/6/c672c62a8f7c2e2a8ed6fc7f654114ef7977cb87.png) ![erorr](https://daynhauhoc.s3.dualstack.ap-southeast-1.amazonaws.com/original/3X/2/b/2b321377a739200310d0f81e1a19610bb669401b.png)  
có ai biết cách khắc phục không

---

<div class="post-metadata">

### Author: ![phucotaku](https://daynhauhoc.com/user_avatar/daynhauhoc.com/phucotaku/32/63467_2.png) [@phucotaku](https://daynhauhoc.com/u/phucotaku)
#### Post date: [May 11, 2023, 9:34am UTC](https://daynhauhoc.com/t/loi-khi-cai-dat-chocolatey/129706/2 "2023-05-11T09:34:43Z")

</div>

À, em nghĩ mạng wifi có vấn đề nên đã update và restart lại window, nó tải ok rồi, sorry mấy anh nha
