Hi anonymous user
Thank you for asking this question on the **Microsoft Q&A Platform. **
The azure function does not support AZ CLI, here you can check the Supported languages in Azure Functions
I recommend you execute your script with PowerShell (Get-AzDnsZone)
Running it with PowerShell will allow you to execute it in a runbook in an Automation Account
Hope this helps,
Carlos Solís Salazar
----------
Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
NOTE: To answer you as quickly as possible, please mention me in your reply.