Calling all PowerShell gurus!
I'm trying to use the Get-AzureRmDataFactoryV2ActivityRun
cmdlet in the azurerm
PowerShell Module.
When I attempt a query, it says:
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
If I try and use the previous implementation of this cmdlet, Get-AzureRmDataFactoryRun
it works just fine. HOWEVER, it will ALSO throw the same error as above if I do not first Select-AzureRMSubscription
.
Furthermore, Select-AzureRMSubscription
before running Get-AzureRMDataFactoryV2ActivityRun
DOES NOT resolve the issue. Is there a different way I should be setting my active subscription? Or is just just a fake solution?
EDIT:
Login-AzureRMAccount -SubscriptionID SUBID
Get-AzureRmDataFactoryRun -DataFactoryName DATAFACTORY -DatasetName DATASET -StartDateTime 2017-10-25T19:34:18+00:00 -ResourceGroupName RESGROUP
Will work.
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
Will not work.
It appears the answer to this question is that DataFactoryv2 is an entirely different resource.
https://docs.microsoft.com/en-us/azure/data-factory/introduction
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.