No Azure environment could be matched given the name AzureCloud

After upgrading to 2018.5.1 we get an error “No Azure environment could be matched given the name AzureCloud” when executing Azure PowerShell scripts. When running “Get-AzureRmEnvironment -Name AzureCloud” from PowerShell ISE on the Octopus Server it does return a value. We already tried removing the calamari folder to no avail. Any suggestions on what we may try to fix this? ServerTasks-42882.log.txt (14.2 KB)

Got a workaround after reading Issue reported on Github.

We forced Octopus to use the external version of the modules by renaming the Powershell folder inside Octopus.Dependencies.AzureCmdlets\5.7.0.

Hi Guy,

Thanks for getting in touch.

We have raised two issues (#4574 and #4572) related to this issue.
The underlying issue is related to executing the Azure tasks on an external worker, so you could try disabling the external worker, or stay with your current workaround until it is resolved.

Regards
Ben