【问题标题】:'Set-AzureRmDataFactoryV2' is not recognized as the name of a cmdlet'Set-AzureRmDataFactoryV2' 未被识别为 cmdlet 的名称
【发布时间】:2018-06-21 12:53:58
【问题描述】:

我在 Ubuntu 16.04 上安装了 Powershell 6.0.0。尝试使用 Powershell 创建 Azure 数据工厂时出现以下错误

Set-AzureRmDataFactoryV2 : The term 'Set-AzureRmDataFactoryV2' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:16
+ $DataFactory = Set-AzureRmDataFactoryV2 -ResourceGroupName $ResGrp.Re ...
+                ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Set-AzureRmDataFactoryV2:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

然后我尝试安装模块并收到以下错误

Install-Module AzureRM -AllowClobber  
                                                                                                                                                                                                                                          Untrusted repository                                                                                                                           You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the  Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?                                                        
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
PackageManagement\Install-Package : The member 'TypesToProcess' in the module manifest is not valid: Cannot find path '/tmp/787167149/Azure.Storage/.\Microsoft.WindowsAzure.Commands.Storage.Types.ps1xml' because it does not exist.. Verify that a valid value is specified for this field in the '/tmp/787167149/Azure.Storage/Azure.Storage.psd1' file.                                                                                 At /opt/microsoft/powershell/6.0.0/Modules/PowerShellGet/1.6.0/PSModule.psm1:2057 char:21                                                      + ...          $null = PackageManagement\Install-Package @PSBoundParameters                                                                    +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                    + CategoryInfo          : ResourceUnavailable: (/tmp/787167149/...re.Storage.psd1:String) [Install-Package], Exception                         + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage         

【问题讨论】:

    标签: powershell azure azure-data-factory


    【解决方案1】:

    目前,Set-AzureRmDataFactoryV2 cmdlet 在 Linux 上不受支持。 AzureRM.NetCore支持以下服务。

    • 虚拟机
    • 应用服务(网站)
    • SQL 数据库
    • 存储
    • 网络

    更多信息请参考这个official document

    如果可能,我建议您可以使用 Azure CLI。

    【讨论】:

      【解决方案2】:

      我已经通过更新 Az.DataFactory 模块在我的机器上解决了这个问题。

      • 安装/更新最新的 AzureRM.DataFactoryV2 模块。
      • 重新启动您的 powershell。
      • 试试上面的命令。

      它将成功运行。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-03-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-03-26
        • 2022-01-10
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多