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

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

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!.

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors