Created
March 5, 2018 14:18
-
-
Save dsolodow/3cd3b16efa0b68bc80ffd80a1b8b1925 to your computer and use it in GitHub Desktop.
cleanup installed modules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-InstalledModule | | |
ForEach-Object { | |
$CurrentVersion = $PSItem.Version | |
Get-InstalledModule -Name $PSItem.Name -AllVersions | | |
Where-Object -Property Version -LT $CurrentVersion | |
} | Uninstall-Module -Verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment