Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)
I want to set a scheduled refresh

Is there any way to test power bi schedule refresh works?

1 Answer

0 votes
by (22.5k points)
edited by

You will get an email in case of refresh failure 

enter image description here

and check whether this option is selected

The below is the PowerShell script to get information about 3 refresh and do automation in times of failure

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

$response = Invoke-PowerBIRestMethod -Url 'groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasets/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/refreshes?$top=3' -Method Get

$response_json = ConvertFrom-Json $response

# Write-Output $response_json

$response_json.value | ForEach-Object { Write-Output "Status: $($_.Status) , Time completed: $($_.endTime)" }

Disconnect-PowerBIServiceAccount

For Power Bi manually refresh:

enter image description here

enter image description here

Want to be a Power BI expert? Come and join this Power BI Training

Related questions

0 votes
1 answer
0 votes
1 answer
asked Apr 5, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Feb 18, 2021 in BI by Chris (11.1k points)

Browse Categories

...