Replace all Invoke-WebRequest methods because ... IE ... :
(Invoke-WebRequest "https://developer.android.com/studio/")
Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete.
Specify the UseBasicParsing parameter and try again.
and use something to pull links with something else besides Invoke-WebRequest :
#$downloadUri = ((Invoke-RestMethod -Method GET -Uri "https://api.github.com/repos/trustcrypto/OnlyKey-App/releases/latest").assets | Where-Object name -like *.exe ).browser_download_url
#Invoke-WebRequest -Uri $downloadUri -Out $env:LOCALAPPDATA\Onlykey.exe
Replace all Invoke-WebRequest methods because ... IE ... :
and use something to pull links with something else besides Invoke-WebRequest :