Hi SahilWadehra,
I asked a similar question recently and the consensus was that I'd need my own smtp server in order to forward the output to email.
However if you use the Logic Apps web UI to export your data you'll have the ability to email from your Outlook account.
How to send Azure Runbook Output in an excel and attach it to an email
Is there any way we can Write the Output of an Azure PS Runbook into an csv and attach it on the email and send to recipients. I was able to send the output as csv to Blob and also send output to email with Logic App but unable to do above. Please guide and thank you in advance !! Below is a small sample PS Query I am running via my Azure Runbook -
Login-AzAccount -Identity
Get-AzConsumptionUsageDetail -StartDate 2022-06-27 -EndDate 2022-07-29 -Top 10 | sort -Descending PretaxCost, UsageQuantity | Select InstanceName, ConsumedService, PretaxCost, UsageQuantity, InstanceId, InstanceLocation, SubscriptionName, CostCenter, MeterId, Product, Tags
Write-Output "Current Cost of Subscription : " $currentCost.Sum
Azure Automation
1 answer
Sort by: Most helpful
-
David Broggy 6,291 Reputation points MVP Volunteer Moderator
2022-09-09T18:47:59.36+00:00