Download one or more modules from a repository, and install them on the local computer.
Syntax
Uninstall-Module [-Name] String[] [-AllVersions] [-MaximumVersion Version]
[-MinimumVersion Version] [-RequiredVersion Version] [-AllowPrerelease]
[-Confirm] [-Force] [-WhatIf] [CommonParameters]
Uninstall-Module [-InputObject] PSObject[]
[-Confirm] [-Force] [-WhatIf] [CommonParameters]
Key
-AllowPrerelease
Allows you to uninstall a module marked as a prerelease.
The proxy cmdlet maps this parameter to the Prerelease parameter of Uninstall-PSResource
-AllVersions
Specify that you want to include all available versions of a module.
You cannot use the -AllVersions parameter with the -MinimumVersion, -MaximumVersion,
or -RequiredVersion parameters.
-Confirm
Prompt for confirmation before uninstalling.
-Force
Force the command to run without asking for user confirmation.
-InputObject
Used for pipeline input.
-MaximumVersion
Specify the maximum version of a single module to uninstall.
The MaximumVersion and RequiredVersion parameters are mutually exclusive;
you cannot use both parameters in the same command.
-MinimumVersion
Specify the minimum version of a single module to uninstall.
The MaximumVersion and RequiredVersion parameters are mutually exclusive;
you cannot use both parameters in the same command.
-Name
Specify the exact names of modules to uninstall.
A comma-separated list of module names is accepted.
-RequiredVersion
Specifies the exact version of a single module to uninstall.
-WhatIf
Describe what would happen if you executed the command, without actually
executing the command.
Uninstall-Module runs on PowerShell 5.0 or later releases
Uninstall a PowerShell module:
PS C:\> Uninstall-Module -Name SpeculationControl
Use the pipeline to uninstall a module:
PS C:\> Get-InstalledModule -Name SpeculationControl | Uninstall-Module
" The hunger for love is much more difficult to remove than the hunger for bread” ~ Mother Teresa
Get-InstalledModule - Get installed modules on a computer.
Find-Module - Find a module.
import-module - Add modules to the current session from a local path.
install-Module - Install a module.
Install-Package - Install one or more software packages.
Uninstall-WindowsFeature - Uninstall/remove roles, role services, and features (2012 R2).
Update-Module - Update a module.
Get-WindowsFeature - Retrieve roles, role services, and features.