Forum Discussion
Jayasreeb
5 years agoFrequent Visitor
PowerShell Script to Refresh PowerBI Dataset is failing
We use PowerShell script to refresh PowerBI Datasets. We run these scripts from SQL agent job. The powershell script was running fine from our server for many days. But all of a sudden it started fa...
- 5 years ago
Hi Jayasreeb
It seems that the error is coming from Office 365 change were TLS 1.0 is being superseded by TLS 1.2. Since it's still working for my default configuration, I guess my tenant is not yet forced on TLS 1.2, but others already switched. The fix is simple. Before executing Invoke-RestMethod, just run this:
[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12If you want to learn more, please refer:
Best Regards,
Link
- 5 years ago
Hi v-xulin-mstf ,
The solution you provided worked. My powershell script is not throwing error anymore after adding that piece of line. I appreciate your help with fixing this outstanding issue that I am working on from many days.