Azure Powershell Get-AzDataFactory 返回错误:在命名空间“Microsoft.DataFactory”中找不到资源类型

Sum*_*mer 2 azure azure-powershell azure-data-factory

我在 Azure 中使用 powershell 控制台来运行此 commandlet:

Get-AzDataFactory -ResourceGroupName "rg-name"
Run Code Online (Sandbox Code Playgroud)

我收到以下错误消息:

Get-AzDataFactory: HTTP Status Code: NotFound
Error Code: InvalidResourceType
Error Message: The resource type could not be found in 
the namespace 'Microsoft.DataFactory' for api version '2015-10-01'.
Request Id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Timestamp (Utc):05/11/2021 17:22:11
Run Code Online (Sandbox Code Playgroud)

此消息是什么意思以及如何解决该问题?

Ste*_*son 7

这取决于你的 Azure 数据工厂版本。如果您的 Azure 数据工厂是 v1,则应使用此命令Get-AzDataFactory -ResourceGroupName "rg-name"。如果是 v2,则需要使用Get-AZDataFactoryV2 -ResourceGroupName "rg-name".