Skip to content

Instantly share code, notes, and snippets.

@AsaiToshiya
Last active October 9, 2020 11:23
Show Gist options
  • Save AsaiToshiya/b371fd63481e726abbc921579ab1c2c0 to your computer and use it in GitHub Desktop.
Save AsaiToshiya/b371fd63481e726abbc921579ab1c2c0 to your computer and use it in GitHub Desktop.
Chocolatey のインストールで "このスクリプトには、悪質なコンテンツが含まれているため、ウイルス対策ソフトウェアによりブロックされています。" が表示された場合の対処方法

Chocolatey のインストールで "このスクリプトには、悪質なコンテンツが含まれているため、ウイルス対策ソフトウェアによりブロックされています。" が表示された場合の対処方法

PS> Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
発生場所 行:1 文字:1
+ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.Service ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
このスクリプトには、悪質なコンテンツが含まれているため、ウイルス対策ソフトウェアによりブロックされています。
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ScriptContainedMaliciousContent

手順

1. 実行ポリシーを変更

PS> Set-ExecutionPolicy Bypass -Scope Process -Force

2. インストール スクリプトをダウンロード

https://chocolatey.org/install.ps1

3. インストール スクリプトを実行

PS> C:\Users\User\Downloads\install.ps1

4. 実行ポリシーを変更

PS> Set-ExecutionPolicy Restricted -Scope Process -Force

5. インストールを確認

PS> choco
Chocolatey v0.10.15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment