Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)
recategorized by
Power BI report schedule button is not working, So is there any possible way to  create a task in the windows task scheduler, which opens power bi and refreshes the report automatically

1 Answer

0 votes
by (22.5k points)

If schedule refresh is not working then manual refresh will also not work

We should try a power shell script to call the REST API and run the script below

Import-Module MicrosoftPowerBIMgmt
Import-Module MicrosoftPowerBIMgmt.Profile

$password = "xxxxxxxxxxxxxxxxxxxxx" | ConvertTo-SecureString -asPlainText -Force
$username = "[email protected]" 
$credential = New-Object System.Management.Automation.PSCredential($username, $password)

Connect-PowerBIServiceAccount -Credential $credential

Invoke-PowerBIRestMethod -Url 'groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/refreshes' -Method Post

Disconnect-PowerBIServiceAccount 

I recommend this Power BI course by Intellipaat to learn Power BI.

Related questions

Browse Categories

...