how can I send email using the azure cli?

David Broggy 5,681 Reputation points MVP

Plan A:
I would like to run some powershell commands using the Azure cli and then send the output to an email.
Is that possible? If so, what are the steps in an example?

Plan B:
How do I send Azure cli output to a Log Analytics Workspace?


Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
790 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,256 Reputation points Microsoft Employee


    You can run PowerShell commands and store those output on a variable and then you can send an email.

    To send email, you can check this doc:

    Karthik Srinivas