【问题标题】:How to list the web jobs in azure app service using powershell?如何使用 powershell 在 azure app 服务中列出 Web 作业?
【发布时间】:2021-03-23 01:27:17
【问题描述】:

我正在尝试使用 YAML 构建管道以在 azure 应用服务中部署 Web 作业。如何列出现有的网络作业?我尝试通过以下脚本使用 AzurePowerShell@5 任务:

Get-AzResource -ResourceGroupName "RESGRPDEV01" | ft

但它不显示网络作业名称。能否请你帮忙? 另外,如果它不存在,我需要创建一个新的网络作业。

【问题讨论】:

  • 看看这个answer?我想它可能会对你有所帮助。

标签: azure powershell yaml azure-powershell


【解决方案1】:

之前有一个特定的命令可以实现相同的功能,但现在您不能使用 Get-AzureWebsiteJob 来获取网络作业。

您可以尝试以下方法,

Get-AzureRmResource -ResourceGroupName $ResourceGroupName -ResourceName $AppService -ResourceType microsoft.web/sites/<Webjob-type> -ApiVersion $Apiversion

您将需要使用 ResourceId 来获取名称。

【讨论】:

    猜你喜欢
    • 2022-01-08
    • 2021-12-07
    • 1970-01-01
    • 1970-01-01
    • 2015-05-04
    • 1970-01-01
    • 1970-01-01
    • 2013-12-13
    • 1970-01-01
    相关资源
    最近更新 更多