我正在嘗試安裝最新的Azure PowerShell(2015年11月9日發佈)。如果我嘗試使用Web平臺安裝程序安裝它,我得到以下錯誤:無法安裝最新的Azure PowerShell
Azure Modules from the PowerShell Gallery are installed on this machine. Please remove these modules before installing this MSI.
如果我在PowerShell中運行Get-InstalledModule
,我看到模塊Azure
(0.9.11版本)安裝。所以我嘗試使用PowerShell命令Uninstall-Module Azure
進行卸載。在這裏我得到以下錯誤:
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