Jul 15 2021 09:24 AM
Hi All,
Can someone help. I am working on creating a failure alert for my runbooks in Azure automation account using powershell. I am using Send-MailMessage command to send email when I catch an error in my runbook and then send email to my work email id.
I have created 2 runbooks(powershell) - 1 parent runbook and 1 child runbook and I am checking for parent runbook failure(using try, catch block) to check for any failures. In case of failure in parent runbook, I am calling child runbook(powershell) to send email to my work email id.
When I am testing my child runbook, then it is able to send test email to my work email id but when I am calling the child runbook from parent runbook, then I am facing error: the remote name could not be resolved {SMTP server name}.
Another test I have done is that parent runbook is able to send parameters to child runbook and child runbook is able to display/use those parameter values.
Command used in child runbook
Can anyone advise me what is the problem here?
Jul 17 2021 01:03 AM