cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Refresh Dataset with PowerShell

Hi All

 

I want to refresh dataset with PowerShell. I did google on it and found some code but all codes are not working currently.

 

Can you please suggest any code which is currently working and can refresh dataset with PowerShell

 

1 REPLY 1
Frequent Visitor

the code I was using stopped to work from day to night...

 

I've been using powershell to refresh powerbi datasets since the begining of times and recently it is getting this error:

is this solution still working for the rest of you?

Invoke-RestMethod -Uri $uri –Headers $authHeader –Method GET –Verbose
VERBOSE: POST https://api.powerbi.com/v1.0/myorg/groups/editedtohidden/datasets/editedtohidden/refreshes with 0-byte payload
Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.
At line:74 char:1
+ Invoke-RestMethod -Uri $uri –Headers $authHeader –Method POST –Verbos ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
 
VERBOSE: GET https://api.powerbi.com/v1.0/myorg/groups/editedtohidden/datasets/editedtohidden/refreshes with 0-byte payload
Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.
At line:78 char:1
+ Invoke-RestMethod -Uri $uri –Headers $authHeader –Method GET –Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand 

 

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.