Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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 3
malafaiabarbara
Frequent Visitor

I have the same problem.

Anonymous
Not applicable

Hi @Anonymous ,

Please review the following blogs, hope they can help you resolve the problem.

REFRESH POWER BI DATASETS WITH POWERSHELL

Managing Power BI Dataset Refresh Failures

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

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)

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.