召集所有PowerShell专家!
我尝试在Get-AzureRmDataFactoryV2ActivityRun
PowerShell模块中使用azurerm
cmdlet。
当我尝试查询时,它会说:
Get-AzureRmDataFactoryV2ActivityRun : HTTP Status Code: NotFound
Error Code: NotFound
Error Message: Operation returned an invalid status code 'NotFound'
Request Id: aea5f9c5-fced-4b03-929f-e071eaeb0d9e
Timestamp (Utc):10/25/2017 19:56:43
At line:1 char:1
+ Get-AzureRmDataFactoryV2ActivityRun -DataFactoryName nwmovdatafactory ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmDataFactoryV2ActivityRun], ErrorResponseException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.DataFactoryV2.GetAzureDataFactoryActivityRunCommand
如果我尝试使用此cmdlet的先前实现,Get-AzureRmDataFactoryRun
它可以正常工作。但是,如果我不先Select-AzureRMSubscription
,它也会抛出与上面相同的错误。
此外,Select-AzureRMSubscription
在运行Get-AzureRMDataFactoryV2ActivityRun
之前无法解决问题。我应该采用不同的方式设置我的有效订阅吗?或者只是一个假的解决方案?
修改
Login-AzureRMAccount -SubscriptionID SUBID
Get-AzureRmDataFactoryRun -DataFactoryName DATAFACTORY -DatasetName DATASET -StartDateTime 2017-10-25T19:34:18+00:00 -ResourceGroupName RESGROUP
会工作。
Login-AzureRMAccount -SubscriptionID SUBID
Get-AzureRmDataFactoryV2ActivityRun -DataFactoryName DATAFACTORY -ResourceGroupName RESGROUP -PipelineRunId PIPELINENAME -RunStartedAfter 2017-10-25T19:34:18+00:00 -RunStartedBefore 2017-10-26T19:34:18+00:00
不行。
答案 0 :(得分:1)
看来这个问题的答案是DataFactoryv2是一个完全不同的资源。
https://docs.microsoft.com/en-us/azure/data-factory/introduction