Forum Discussion
EricShahi
3 years agoHelper IV
Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a receive
Hi everyone, To Introduce myself : Working as a Power BI Developer with PBI Admin access. My Powershell script stoped working suddenly and prompting me an error saying the underlying connect...
- 3 years ago
Hi,
This could be as I am using a proxy server / connected to the client network using VPN.
TBH, the only way to find out is to go to office and try to execute this API and see it works.I will keep an update on this.
Thanks.
nitishsh91
3 years agoSolution Supplier
Hi EricShahi
I also suspect issue with tls in your firewall from where you are trying to run this command, please add that line to top of your script and see if it helps.
Also use try it feature from below link and see if that works and if it does work then issue is with your firewall which is not allowing the connection.
https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-report
Please let me know if it helps.