Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Refresh dataset with powershell (change mail)

When using this command in powershell

 

#5. Execute refreshes with mail on failure

$MailFailureNotify = @{"notifyOption"="MailOnFailure"}

Invoke-PowerBIRestMethod -Url $RefreshDSURL -Method Post -Body $MailFailureNotify

 

Is it possible to specify other "notification on failure" emails ? if yes, how?

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      I read the first post before coming here with this problem and it doesnt mention you can change the mail.

      The second its true that it covers a way to notify errors with email but you have to create another powershell , get the history, import it from powerbi, schedeule it, create a dashboard with changes and subscribe those changes..... too much work.

       

      The problem is im not receiving emails from dataset errors unless they are scheduled in the powerbi portal. Currently, all of our datasets in the company refresh using powershell in the middle of Data Warehouse load.

      powershell is using my account (email)