Blue Clouds
Blue Clouds

Reputation: 8151

'The term 'Set-AzureRmDataFactoryV2' is not recognized as the name of a cmdlet' error in Pipeline Azure Devops

Azure Powershell AZ module still does not work in azure devops pipeline?

I get this error when I try powershell version 4+ and the agent is 2017 (also tried windows 2019)

#Install-Module -Name Az -AllowClobber -Scope CurrentUser (is this needed? I tried with and #without and it fails)
Set-AzureRmDataFactoryV2 -ResourceGroupName "myRG" -Name "LLmenADF1" -Location "North Europe"

enter image description here

Upvotes: 0

Views: 632

Answers (2)

Bevan
Bevan

Reputation: 1424

@Martin Esteban Zurita has the correct recommended solution to migrate to Az commands

For those that can't/won't for any reason, just select Version 3 of the Azure Powershell task to work with AzureRM commands.

Upvotes: 1

Martin Esteban Zurita
Martin Esteban Zurita

Reputation: 3209

If you are using Powershell Az module, then the cmdlet is:

Set-AzDataFactoryV2

Your cmdlet makes reference to the old library, AzureRM. To get the same cmdlet when migrating from one library to another, just replace AzureRM with Az.

Hope this helped!

Upvotes: 1

Related Questions