Reputation: 379
I am attempting to run an azureRM script via a devops pipeline.
I have tried all the possible powershell tasks, however I am always met with the following error:
New-AzureRmResource : The term 'New-AzureRmResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
The script is designed to add a VNET to an app service. I am aware that AzureRM is outdated, however there is no way to do cross-regional VNet integration via Az or the az cli.
How can I run an AzureRm script via a devops pipeline?
Upvotes: 2
Views: 1050
Reputation: 19431
Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024. So you can try to use Az.Resources module instead.
For the changes between AzureRm and Az, please view this document(Az.Resources (previously AzureRM.Resources)).
In addition, agree with Repcak. You can use AzurePowerShell@3 task or earlier, because these versions of task support AzureRm modules.
Upvotes: 3
Reputation: 1006
I assume you use Microsoft Hosted Agents
Multiple ways:
Upvotes: 4