背景:
阅读新闻

Uninstall the AzureRM module

  作者: 今日评论: [字体: ]

详细→ https://docs.microsoft.com/en-us/powershell/azure/uninstall-az-ps?view=azps-3.6.1

Uninstall the AzureRM module

If you have the Az module installed on your system and would like to uninstall AzureRM, there are two options that don't require running the Uninstall-AllModules script above. Which method you follow depends on how you installed the AzureRM module. If you're not sure of your original install method, follow the steps for uninstalling an MSI first.

Uninstall Azure PowerShell MSI

If you installed the Azure PowerShell AzureRM modules using the MSI package, you must uninstall through the Windows system rather than PowerShell.

TABLE 2
Platform Instructions
Windows 10 Start > Settings > Apps
Windows 7
Windows 8
Start > Control Panel > Programs > Uninstall a program

Once on this screen you should see Azure PowerShell or Microsoft Azure PowerShell - Month Year in the program listing. This is the app to uninstall. If you don't see this program listed, then you installed through PowerShellGet, and should follow the next set of instructions.

Uninstall from PowerShell

If you installed AzureRM with PowerShellGet, then you can remove the modules with the Uninstall-AzureRM command, available as part of the Az.Accounts module. This removes all AzureRM modules from your machine, but requires administrator privileges.

PowerShell
Uninstall-AzureRm

or

PowerShell
Uninstall-Module AzureRm

If you can't successfully run the Uninstall-AzureRM command, use the Uninstall-AllModules script provided in this article with the following invocation:

PowerShell
$versions = (Get-InstalledModule AzureRM -AllVersions | Select-Object Version)
$versions | foreach { Uninstall-AllModules -TargetModule AzureRM -Version ($_.Version) -Force }

or

PowerShell
foreach ($module in (Get-Module -ListAvailable AzureRM*).Name |Get-Unique) {
   write-host "Removing Module $module"
   Uninstall-module $module
}
来源:
录入日期:[2020/03/15 21:56:00]
收藏 推荐 打印 | 录入:mikebai | 阅读:
文章评论      
正在加载评论列表...
评论关闭