PowerShell Invoke-WebRequest Fails After a Windows Update
Asked by
!CheckTheSpelling
After updating Windows, I tried installing Spicetify by running the installation command provided in its setup instructions: `iwr -useb | iex`. PowerShell returned an error saying, "The underlying connection was closed: The connection was closed unexpectedly." I'm not very familiar with PowerShell, so I'm looking for a straightforward explanation and a safe way to fix the installation.
Answers
The command being used matters here. The error is coming from PowerShellโs `Invoke-WebRequest`, and newer Windows or PowerShell changes may require the `-UseBasicParsing` parameter when downloading script content. Try adding that parameter to the web request, or check whether the installation instructions have been updated for the current Windows version.
Reply to this answer
Add your answer
Answers are reviewed before publication.
!CheckTheSpelling: I used the install command shown in the setup instructions. Iโm only using PowerShell because the guide says to paste the command there; Iโm not trying to learn programming, just follow the installation steps.