fix(install.ps1): Enable TLS 1.2 for Windows PowerShell 5.1 compatibility

Resolved 💬 1 comment Opened Jul 25, 2026 by derline Closed Jul 25, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Problem

When running the default PowerShell installer command on Windows using standard Windows PowerShell 5.1:

powershell -ExecutionPolicy Bypass -c '$env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex'

The update/installation fails with The term 'Get-FileHash' is not recognized (or hash validation failure) because the script fails to download
the release binary package.

### Root Cause

Windows PowerShell 5.1 defaults to older SSL/TLS protocols (TLS 1.0/1.1). Without explicitly setting TLS 1.2 in install.ps1 , Invoke-RestMethod
fails to connect and fetch the release package, resulting in downstream script errors when attempting hash verification on an empty/invalid
download.

Workaround: Explicitly setting [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 resolves the issue.

### Suggested Fix

Add TLS 1.2 fallback logic near the top of install.ps1 :

[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #34030

Powered by Codex Action