skip to Main Content

running powershell command via ARM template throws "The term 'Connect-AzureAD' is not recognized as a name of a cmdlet" error

I am trying to execute the following powershell script via Azure ARM template (snippet below), Install-Module -Name AzureAD -force Import-Module -Name AzureAD -UseWindowsPowerShell -RequiredVersion 2.0.2.89 -force $SecurePassword = ConvertTo-SecureString $password -AsPlainText -Force $credentials = New-Object System.Management.Automation.PSCredential($username, $SecurePassword) Connect-AzureAD -Credential $credentials…

VIEW QUESTION
Back To Top
Search