Run the following commands to remove any previous versions of installed PowerShell modules:
Info |
---|
This will perform the following actions for each PowerShell module:
|
Code Block | ||
---|---|---|
| ||
$InstalledModules = Get-InstalledModule; ForEach ($Module in $InstalledModules) { Get-InstalledModule -Name $Module.Name -AllVersions | Where-Object { $_.Version -ne $Module.Version } | Uninstall-Module } |
...