Я выполняю шаги Chocolately Install (Windows 7), но столкнулся с парой проблем.
Во-первых, я открыл Командную строку (открывая его с помощью Запуск от имени администратора ), но при попытке выполнить 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'))
я получаю такую ошибку:
Uncaught SyntaxError: Unexpected identifier
.. с выделенной частью моей команды https:
.
Далее, когда я пытаюсь выполнить Get-ExecutionPolicy
, это приводит к:
Uncaught ReferenceError: Get не определен
Есть идеи, что может быть не так?
* ОБНОВЛЕНИЕ *
Когда я пробую ту же команду в PowerShell , я получаю такую ошибку:
PS C: \ Users \ mylogin> Set-ExecutionPolicy Bypass -Scope Process -Force; [System. Net .ServicePointManager] :: SecurityProto c ol = [System. Net .ServicePointManager] :: SecurityProtocol -bor 3072; iex ((New-Object System. Net .WebClient) .DownloadString ('https://chocolatey.org/install.ps1')) Настройка исключения «SecurityProtocol»: «Невозможно преобразовать значение« 3312 »в тип« System. Net .SecurityProtocolType "из-за неявных значений перечисления. Укажите одно из следующих значений перечисления и повторите попытку. Возможные значения перечисления:" Ssl3, Tls ". В строке: 1 символ: 85 + Set-ExecutionPolicy Bypass -Scope Process -Force; [System. Net .ServicePointManager] :: <<<< SecurityProtocol = [System. Net .ServicePointManager] :: SecurityProtocol -bor 3072; iex ((New-Object System. Net .WebClient) .DownloadString ('<a href="https://ch" rel="nofollow noreferrer">https://ch ocolatey.org/install.ps1')) + CategoryInfo: InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId: PropertyAssignmentException
Исключение, вызывающее «DownloadString» с аргументом (ами) «1»: «Базовое соединение было закрыто: непредвиденная ошибка o cc urred при отправке». В строке: 1 символ: 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 <<<< ('<a href="https://ch" rel="nofollow noreferrer">https://ch ocolatey.org/install.ps1')) + CategoryInfo: NotSpecified: (:) [ ], MethodInvocationException + FullyQualifiedErrorId: DotNetMethodException