“Set-AzureRmDataFactoryV2”未被识别为cmdlet的名称

时间:2018-01-12 05:05:09

标签: powershell azure azure-data-factory

我在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         

2 个答案:

答案 0 :(得分:1)

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

  • 虚拟机
  • App Service(网站)
  • SQL数据库
  • 存储
  • 网络

更多信息请参阅此official document

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

答案 1 :(得分:0)

我已经通过更新Az.DataFactory模块解决了该问题。

  • 安装/更新最新的AzureRM.DataFactoryV2模块。
  • 重新启动Powershell。
  • 尝试上述命令。

它将成功运行。

相关问题