Octopus Deploy server scripts, such as AzuerContext.ps1 (https://github.com/OctopusDeploy/Calamari/blob/master/source/Calamari.Azure/Scripts/AzureContext.ps1) works when AzureRM module installed or Enable-AzureRmAlias is turned on, though we are about to move off AzureRm from the box completely, can not do that as login to Azure that Octopus is doing using Service Principle Account, not working:
Attempt 1 of 5 failed: The term ‘Disable-AzureRMContextAutosave’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Thanks for response! Actually, I have Enabled aliases for Local Machine scope and made AzureRm migration to Az cmdlets. The problem is that I want to disable it… I dont want aliases running on Local Machine as migration is done. But I can not do that - Octopus is using old cmdlets. We are looking to know when / how octopus will support moving off azurerm cmdlets.
Thanks for the update here. I had a chat to the developers about this and it looks like we currently don’t have any plans to move off these cmdlets in the near future. The problem has to do with Microsoft moving the goal posts on us. Constantly keeping up has been a bit of a futile challenge for us so we are staying put for now.
The current solution to disable this here would be to run Disable-AzureRmAlias in a subsequent step in your deployment.
If you have further thoughts or questions on this let me know. I’m currently deferring to our developers for information on this so I’d be happy to bring any questions you have to them.