Azure-Samples / powerbi-powershell

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

Email Notification #33

Open Ariel044 opened 5 years ago

Ariel044 commented 5 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 5 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 5 years ago

You can also add to $Body following:

  { "notifyOption": "MailOnFailure"
  }