Reputation: 696
I am trying to install the latest Azure PowerShell (released Nov. 9th 2015). If I try to install it using Web Platform Installer, I get the following error:
Azure Modules from the PowerShell Gallery are installed on this machine. Please remove these modules before installing this MSI.
If I run Get-InstalledModule
in PowerShell, I see that the Module Azure
(version 0.9.11) is installed. So I tried uninstalling it using the PowerShell command Uninstall-Module Azure
. Here I get the following error:
PackageManagement\Uninstall-Package : The property 'ModuleBase' cannot be found on this object. Verify that the
property exists.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:1351 char:21
+ ... $null = PackageManagement\Uninstall-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Microsoft.Power...ninstallPackage:UninstallPackage) [Uninstall-Package],
Exception
+ FullyQualifiedErrorId : PropertyNotFoundStrict,Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage
Upvotes: 2
Views: 1777
Reputation: 2402
I hit the same issue, but did not have anything Azure related appear when I executed Get-InstalledModule
.
If you execute $env:PSModulePath
in a powershell prompt it will list out all of your Module path locations, navigate to each of those and delete anything azure related and you should be able to install the new azure powershell cmdlets.
Upvotes: 0
Reputation: 696
Ok, I solved my problem. Stupid mistake: I was not running Uninstall-Module Azure
as an admin. Once I started PowerShell with admin priviledges, uninstalling old Azure PowerShell was no problem.
Hm, would love to see a more descriptive error message in that case ;-)
Upvotes: 3