CI CD Pipeline to deploy Console App as webjobs

Gayatri Garapati 1 Reputation point Microsoft Employee
2020-06-15T17:10:55.01+00:00

CI CD Pipeline to deploy Console App as webjobs
Using the Azure PowerShell task in the release pipeline by passing the Powershell Script file path.
Release is failing with below error
2020-06-15T14:08:47.5855902Z Get-AzureRmResource : The term 'Get-AzureRmResource' is not recognized as the name of a cmdlet, function, script file,
2020-06-15T14:08:47.5893338Z or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
2020-06-15T14:08:47.5894071Z try again.
2020-06-15T14:08:47.5894514Z At D:\a\r1\a_AskHR-ApprovalService-Gated\CopyEmailFromExchange-drop\DeploymentScripts\AddWebJob.ps1:38 char:19
2020-06-15T14:08:47.5895442Z + $webJobList = Get-AzureRmResource -ResourceGroupName $ResourceGro ...
2020-06-15T14:08:47.5895879Z + ~~~~~~~~~~~~~~~~~~~
2020-06-15T14:08:47.5896344Z + CategoryInfo : ObjectNotFound: (Get-AzureRmResource:String) [], CommandNotFoundException
2020-06-15T14:08:47.5896796Z + FullyQualifiedErrorId : CommandNotFoundException
2020-06-15T14:08:47.5897099Z
2020-06-15T14:08:47.5928917Z Add-Type : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more
2020-06-15T14:08:47.5934541Z information.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,095 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,471 Reputation points Microsoft Employee
    2020-06-17T15:42:14.237+00:00

    Hi @GayatriGarapati-1845,

    Can you tell me which version of the Azure PowerShell task and version you're using? Are you doing inline or script file?

    10235-2020-06-17-11-34-59-ryhilldemo2-ci-azure-devops-se.png