Skip to content

Instantly share code, notes, and snippets.

@ishu3101
Created June 15, 2016 23:44
Show Gist options
  • Select an option

  • Save ishu3101/bc9591f42e6abc3b427704663e0bcbd2 to your computer and use it in GitHub Desktop.

Select an option

Save ishu3101/bc9591f42e6abc3b427704663e0bcbd2 to your computer and use it in GitHub Desktop.
Get Reminded of Outdated Modules in Powershell. See https://communary.net/2016/02/21/get-reminded-of-outdated-modules/
function Get-OutDatedModule(){
$loadedModules = Get-Module
foreach ($module in $loadedModules) {
$foundModule = Find-Package -Name $module.Name -ErrorAction SilentlyContinue
if ($foundModule) {
if ($module.Version -lt $foundModule.Version) {
Write-Host "$($module.Name): Installed version: $($module.Version.ToString()) - Newest version: " -NoNewline
Write-Host "$($foundModule.Version.ToString())" -ForegroundColor Red
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment