Azure CLI upload/update 一个由 azure cli 和 powershell 编写的脚本吗?

Could Azure CLI upload/update a script which was code by azure cli and powershell?

Azure CLI upload/update 一个由 azure cli 和 powershell 编写的脚本吗?

例如
有演示。ps1:

$json = az group list;
sendemail --body $json --to "xxxx@google.com" --title "xxx";

我想上传演示。ps1 并在 azure 上创建一个任务作业,例如

az somecommand create task --time "every 3 hour" --file demo.ps1

像这样上传任务:

az somecommand update task --time "every 3 hour" --file demo.ps1

我尝试过的和知道的:

预定上传脚本无意义,但对运行预定脚本有意义

如您所知,Azure 自动化 运行这本书不支持 Azure CLI。 但是 power shell 可以完成 CLI 做的大多数工作,您可以尝试使用 运行 书中的 power shell 命令,以及 link 计划 到 运行 脚本。