This file contains hidden or 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
| class Software { | |
| [string]$Name | |
| [string]$Id | |
| [string]$Version | |
| [string]$AvailableVersion | |
| } | |
| [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
| $upgradeResult = winget upgrade | Out-String |
This file contains hidden or 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
| <# | |
| This may not work properly or completely in all PowerShell hosts. Because the function | |
| relies on Get-CimInstance it will not work on Linux platforms. | |
| It is also admittedly not speedy as it is doing a lot of stuff, although there is an | |
| attempt to cache some information which gets updated every 15 minutes. | |
| To use, dot source this script in your PowerShell profile to make it your default prompt. | |
| Sample prompt: |