Thanks for the additional information.
Could you please confirm how you’ve got the post deployment script setup? Is this on your Azure Web App step, done via “Configure Features > Custom deployment scripts > Post-deployment script” (or is this a postdeployment script in your package?), or have you setup an additional step after your Azure Web App step?
If you could take a screenshot showing where and how your post-deployment script is defined, that may help us reproduce.
Octopus bundles the Azure PowerShell modules, so you shouldn’t need to install them, and they should definitely be listed out when you run that command. You should see something like this for starters:
Name : Azure
Path : C:\Octopus\master\OctopusServer\Tools\Octopus.Dependencies.AzureCmdlets\5.7.0\Powershell\Azure\5.1.2\Azure.psd1
Once we understand how your post-deployment script is setup, we may have a better angle on what’s going wrong.