PowerShell Invoke-WebRequest Fails After a Windows Update
Asked by
_lane3start
I recently updated Windows and then tried installing Spicetify using the official PowerShell command: iwr -useb https://raw.githubusercontent.com/spicetify/cli/main/install.ps1 | iex. Instead, PowerShell returned "The underlying connection was closed: The connection was closed unexpectedly" from Invoke-WebRequest. I'm not very familiar with PowerShell and was only using it because the installation instructions told me to paste the command there. Does anyone know what changed or how to fix this?
Answers
The exact command matters here, but the command you used is the installation command provided by the project, so using PowerShell isnโt inherently unusual. The error points to PowerShell failing while connecting to the scriptโs web address rather than necessarily indicating a problem with the app itself.
Reply to this answer
Windows PowerShell 5.1 may now require the -UseBasicParsing parameter for Invoke-WebRequest in some situations. Try adding it to the command, for example: iwr -UseBasicParsing -useb https://raw.githubusercontent.com/spicetify/cli/main/install.ps1 | iex. The installation instructions may need to be updated if they donโt include that option.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_lane3start: Thatโs the command I used from the installation guide. Iโm not trying to learn PowerShellโIโm just following the setup steps to install the app.