Skip to content

Instantly share code, notes, and snippets.

@CurlyBytes
Forked from procdaddy11/Outdatedchoco.ps1
Created March 18, 2021 14:25
Show Gist options
  • Select an option

  • Save CurlyBytes/83ee81217bb86e05f61daa67bbeebc80 to your computer and use it in GitHub Desktop.

Select an option

Save CurlyBytes/83ee81217bb86e05f61daa67bbeebc80 to your computer and use it in GitHub Desktop.
Outdated Choco
$ErrorActionPreference = "Stop"
Import-Module -Name PushoverForPS
$outdated = (choco outdated -r | Select-String '^([^|]+)\|.*$').Matches.Groups | Where-Object {$_.Name -eq 1} | ForEach-Object {$_.Value}
$pretty = ($outdated -join ', ')
If ($outdated.count -gt 0) {
Send-Pushover -AppToken TOKENGOESHERE -UserKey KEYGOESHERE -Message "Outdated packages: `n$pretty"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment