We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Title: Uninstall older versions of PowerShell after successful upgrade
Description: Should have a way to uninstall older powershell versions after successful upgrade.
The text was updated successfully, but these errors were encountered:
Actively investigating this issue - in the meantime you can use this workaround.
remove_old_modules.ps1
$modules = @("AksHci", "Kva", "Moc", "DownloadSdk", "TraceProvider") foreach($module in $modules) { $current = Get-InstalledModule -Name $module -ErrorAction Ignore if (-not $current) { Write-Host $("[Module: $module] Is not installed, skipping") continue } Write-Host $("[Module: $module] Newest installed version is $($current.Version)") $versions = Get-InstalledModule -Name $module -AllVersions foreach($version in $versions) { if ($version.Version -eq $current.Version) { Write-Host $("[Module: $module] Skipping uninstall for version $($version.Version)") continue } Write-Host $("[Module: $module] Uninstalling version $($version.Version)") $version | Uninstall-Module -Force -Confirm:$false } }
Sorry, something went wrong.
No branches or pull requests
Title: Uninstall older versions of PowerShell after successful upgrade
Description: Should have a way to uninstall older powershell versions after successful upgrade.
The text was updated successfully, but these errors were encountered: