Share via


Uninstall-AzModule

Uninstall Azure PowerShell modules.

Syntax

Default (Default)

Uninstall-AzModule
    [-ExcludeModule <String[]>]
    [-PrereleaseOnly]
    [-RemoveAzureRm]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByName

Uninstall-AzModule
    [-Name] <String[]>
    [-RemoveAzureRm]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Uninstall Azure PowerShell modules.

Examples

EXAMPLE 1

Uninstall-AzModule storage, network

EXAMPLE 2

Uninstall-AzModule -ExcludeModule storage, network

EXAMPLE 3

Uninstall-AzModule -PrereleaseOnly

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExcludeModule

Az modules to exclude from uninstallation.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Default
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Force

Installs modules and overrides the confirmation messages of each step.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Az modules to uninstall. Can be the names without Az. prefix.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByName
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PrereleaseOnly

Specify to uninstall prerelease modules only.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

Default
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveAzureRm

Remove all Azure and AzureRm modules.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.