Hi @Marcos Guedes ,
Short answer: Create a new runbook with runtime version as 7.1 (preview) and then copy paste your runbook content into it then you can avoid the error.
Long answer: I have tried to reproduce the issue by creating a runbook with runtime version as 5.1 and another runbook with runtime version as 7.1(preview). It has given the same error as you mentioned when the runtime is 5.1 and it worked successfully when the runtime is 7.1(preview).
Illustration:
Runbook with runtime version 5.1:
Runbook with runtime version 7.1(preview):
For more information with regards to runtime versions 5.1 and 7.1(preview), you may refer this Azure document.
If you have additional question: When will we support Az CLI in runbooks?
Answer: We will be bringing in the Az CLI support to Azure Automation post Powershell 7 support which is planned around CY21 Q4 timeframe. This is the source of the provided information.