Azure-Samples / powerbi-powershell

Samples for calling the Power BI REST API via PowerShell
MIT License
256 stars 189 forks source link

Email Notification #33

Open Ariel044 opened 4 years ago

Ariel044 commented 4 years ago

I successfully ran PowerShell script for calling the Power BI REST APIs following this instruction from Github. https://github.com/Azure-Samples/powerbi-powershell

Does somebody know a way to send an email alert when the process above finish? Like sending out an alert of the result of the refreshing. Please help!

richardlhughes commented 4 years ago

I would suggest in you PowerShell Script you can run the function Send-MailMessage at the end of your script.

Reference: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage

zuzka188 commented 4 years ago

You can also add to $Body following:

  { "notifyOption": "MailOnFailure"
  }