Skip to content

Commit 357bb8d

Browse files
authored
Fixes MicrosoftDocs#1494 - Clarified module specific sections (MicrosoftDocs#1498)
1 parent 3931627 commit 357bb8d

File tree

1 file changed

+20
-29
lines changed

1 file changed

+20
-29
lines changed

docs-conceptual/azps-4.4.0/uninstall-az-ps.md

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ feedback through the [Send-Feedback](/powershell/module/az.accounts/send-feedbac
1313
encountered a bug, we'd appreciate it if you
1414
[file a GitHub issue](https://github.com/azure/azure-powershell/issues) so that it can be fixed.
1515

16-
## Uninstall Azure PowerShell from MSI
16+
## Uninstall the Az PowerShell module from MSI
1717

18-
If you installed Azure PowerShell using the MSI package, you must uninstall through the Windows
18+
If you installed Az PowerShell module using the MSI package, you must uninstall through the Windows
1919
system rather than PowerShell.
2020

2121
| Platform | Instructions |
@@ -27,15 +27,15 @@ Once on this screen, you should see **Azure PowerShell** in the program listing.
2727
uninstall. If you don't see this program listed, then you installed through PowerShellGet, and
2828
should follow the next set of instructions.
2929

30-
## Uninstall Azure PowerShell from PowerShellGet
30+
## Uninstall the Az PowerShell module from PowerShellGet
3131

3232
To uninstall the Az modules, you can use the
3333
[Uninstall-Module](/powershell/module/powershellget/uninstall-module) cmdlet. However,
34-
`Uninstall-Module` only uninstalls one module. To remove Azure PowerShell completely, you must
35-
uninstall each module individually. Uninstallation can be complicated if you have more than one
34+
`Uninstall-Module` only uninstalls one module. To remove the Az PowerShell module completely, you
35+
must uninstall each module individually. Uninstallation can be complicated if you have more than one
3636
version of Azure PowerShell installed.
3737

38-
To check which versions of Azure PowerShell you've installed, run the following command:
38+
To check which versions of the Az PowerShell module you've installed, run the following command:
3939

4040
```powershell-interactive
4141
Get-InstalledModule -Name Az -AllVersions
@@ -52,7 +52,7 @@ Version Name Repository Descript
5252

5353
The following script queries the PowerShell Gallery to get a list of dependent submodules. Then,
5454
the script uninstalls the correct version of each submodule. You need to have administrator access
55-
to run this script in a scope other than **Process** or **CurrentUser**.
55+
to run this script in a scope other than **Process** or **Current User**.
5656

5757
```powershell-interactive
5858
function Uninstall-AzModule {
@@ -149,7 +149,8 @@ function Uninstall-AzModule {
149149
```
150150

151151
To use this function, copy and paste the code into your PowerShell session. The following example
152-
shows how to run the function to remove an older version of Azure PowerShell.
152+
shows how to run the function to remove an older version of the Az PowerShell module and its
153+
submodules.
153154

154155
```powershell-interactive
155156
Uninstall-AzModule -Name Az -Version 1.8.0
@@ -175,27 +176,26 @@ Az.ApplicationInsights 1.0.0 Uninstalled
175176
> uninstall _any_ version of that dependency. This is because there may be other versions of the
176177
> target module on your system which rely on these dependencies.
177178
178-
Run the following example for every version of Azure PowerShell that you want to uninstall. For
179-
convenience, the following script uninstalls all versions of Az **except** for the latest.
179+
Run the following example for every version of the Az PowerShell module that you want to uninstall.
180+
For convenience, the following script uninstalls all versions of Az **except** for the latest.
180181

181182
```powershell-interactive
182-
$Modules = Get-InstalledModule -Name Az -AllVersions |
183-
Sort-Object -Property Version -Descending |
183+
$Modules = Get-InstalledModule -Name Az -AllVersions |
184+
Sort-Object -Property Version -Descending |
184185
Select-Object -Skip 1
185186
$Modules | ForEach-Object {Uninstall-AzModule -Name $_.Name -Version $_.Version}
186187
```
187188

188189
## Uninstall the AzureRM module
189190

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

195-
### Uninstall Azure PowerShell MSI
195+
### Uninstall the AzureRM PowerShell module from MSI
196196

197-
If you installed the Azure PowerShell AzureRM modules using the MSI package, you must uninstall
198-
through the Windows system rather than PowerShell.
197+
If you installed the AzureRM PowerShell module using the MSI package, you must uninstall through the
198+
Windows system rather than PowerShell.
199199

200200
| Platform | Instructions |
201201
| ------------------------ | ------------------------------------------------------ |
@@ -206,22 +206,13 @@ Once on this screen, you should see **Azure PowerShell** or **Microsoft Azure Po
206206
Year** in the program listing. This is the app to uninstall. If you don't see this program listed,
207207
then you installed through PowerShellGet, and should follow the next set of instructions.
208208

209-
### Uninstall from PowerShell
209+
### Uninstall the AzureRM PowerShell module from PowerShellGet
210210

211211
If you installed AzureRM with PowerShellGet, then you can remove the modules with the
212212
[Uninstall-AzureRM](/powershell/module/az.accounts/uninstall-azurerm) cmdlet, available as part of
213-
the `Az.Accounts` module. The following example removes _all_ AzureRM modules from your machine but
213+
the `Az.Accounts` module. The following example removes _all_ AzureRM modules from your machine. It
214214
requires administrator privileges.
215215

216216
```powershell-interactive
217217
Uninstall-AzureRm
218218
```
219-
220-
If you can't successfully run the `Uninstall-AzureRM` command, use the
221-
[`Uninstall-AzModule` script](#uninstall-script) provided in this article with the following
222-
invocation:
223-
224-
```powershell-interactive
225-
$Modules = Get-InstalledModule -Name AzureRM -AllVersions
226-
$Modules | ForEach-Object {Uninstall-AzModule -Name $_.Name -Version $_.Version}
227-
```

0 commit comments

Comments
 (0)