详细→ 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.
Last updated:2020-03-15