Posts

Uninstalling all versions of Azure PowerShell

I hit an interesting snag with the Azure PowerShell Module this week. It turns out that during a bit of troubleshooting before Christmas, I had deliberately installed multiple versions of the package - to cut a long story short, I thought that another engineer's problems were caused by him doing the same, and so I tried to recreate it. It wasn't in fact the problem, but I didn't bother cleaning up after myself. When you install the module for the first time, it's relatively straightforward: Install-Module AzureRM  but there's a downside to this simplicity. The 'AzureRM' package is just a wrapper that has dependencies on all of the other AzureRM modules. As a result, trying to update or uninstall this package works, but doesn't have the expected effect: > Uninstall-Module AzureRM > Get-InstalledModule Version Name ------- ---- 0.5.0   Azure.AnalysisServices 4.0.2   Azure.Storage PSGallery Microsoft Azure PowerShell - Storage service 0.6.