0

I've tried to run some script with powershell, but have this error, and then realized that i can't make simple invoke-webrequest. I've tried to change dns server and flush dns cache, but it's doesn't work. Where is the problem?

PS D:\Soft> .\install.ps1
Invoke-WebRequest: D:\Soft\install.ps1:35
Line |
  35 |  … $version = (Invoke-WebRequest -Uri "$baseURL/version.txt" -UseBasicPa …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The Local Security Authority cannot be contacted

PS D:\Soft> invoke-webrequest https://google.com
Invoke-WebRequest: The Local Security Authority cannot be contacted
PS D:\Soft> Invoke-WebRequest -Uri https://www.bing.com/search?q=wtf
Invoke-WebRequest: The Local Security Authority cannot be contacted

Also, it's unable to use simple curl request:

D:\Soft>curl https://google.com
curl: (35) schannel: AcquireCredentialsHandle failed: 
SEC_E_INTERNAL_ERROR (0x80090304) - The Local Security Authority 
cannot be contacted
  • Does your network setup use a proxy server? You may need to specify one or more of the `-Proxy` parameters if one is configured. – Booga Roo Jun 19 '22 at 06:03
  • No, I use VPN, but when I switch it off, nothing changes. – Denis Samotuga Jun 19 '22 at 09:45
  • Ok, I realised that only https requests fails. So, I've replaced all https with http and everything is working now. This is not correct solution of problem, but it's work for me. – Denis Samotuga Jun 19 '22 at 20:37

0 Answers0