【问题标题】:'The term 'Set-AzureRmDataFactoryV2' is not recognized as the name of a cmdlet' error in Pipeline Azure Devops管道 Azure Devops 中的“术语 'Set-AzureRmDataFactoryV2' 未被识别为 cmdlet 的名称”错误
【发布时间】:2020-02-29 06:20:35
【问题描述】:

Azure Powershell AZ 模块仍然无法在 azure devops 管道中运行?

当我尝试 powershell 版本 4+ 并且代理是 2017 时出现此错误(也尝试过 windows 2019)

#Install-Module -Name Az -AllowClobber -Scope CurrentUser (is this needed? I tried with and #without and it fails)
Set-AzureRmDataFactoryV2 -ResourceGroupName "myRG" -Name "LLmenADF1" -Location "North Europe"

【问题讨论】:

    标签: azure azure-data-factory-2


    【解决方案1】:

    如果您使用的是 Powershell Az 模块,则 cmdlet 为:

    Set-AzDataFactoryV2
    

    您的 cmdlet 引用了旧库 AzureRM。要在从一个库迁移到另一个库时获得相同的 cmdlet,只需将 AzureRM 替换为 Az。

    希望这有帮助!

    【讨论】:

      【解决方案2】:

      @Martin Esteban Zurita 有正确的推荐解决方案来迁移到 Az 命令

      对于那些因任何原因不能/不会的人,只需选择 Azure Powershell 任务的版本 3 即可使用 AzureRM 命令。

      【讨论】:

        猜你喜欢
        • 2018-06-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-10-12
        • 2017-12-11
        • 2021-12-09
        • 2020-02-25
        • 2020-04-17
        相关资源
        最近更新 更多