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

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

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