mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-25 19:38:17 +02:00
Updated list-updates.ps1
This commit is contained in:
parent
03f3b98232
commit
28835cf13c
@ -4,13 +4,14 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script queries the latest available software updates for the
|
This PowerShell script queries the latest available software updates for the
|
||||||
local machine and lists it.
|
local machine and lists it.
|
||||||
NOTE: Use the script 'install-updates.ps1' to install the listed updates.
|
NOTE: Execute 'install-updates.ps1' to install the listed updates.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-updates.ps1
|
PS> ./list-updates.ps1
|
||||||
|
⏳ Querying updates from Microsoft Store...
|
||||||
|
|
||||||
Name Id Version Available Source
|
Name Id Version Available
|
||||||
------------------------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
Git Git.Git 2.43.0 2.44.0 winget
|
Git Git.Git 2.43.0 2.44.0
|
||||||
...
|
...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
@ -28,13 +29,12 @@ try {
|
|||||||
} elseif ($IsMacOS) {
|
} elseif ($IsMacOS) {
|
||||||
throw "Sorry, MacOS not supported yet"
|
throw "Sorry, MacOS not supported yet"
|
||||||
} else {
|
} else {
|
||||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
|
||||||
Write-Host "`n⏳ Querying updates from WinGet Store..." -foregroundColor green
|
|
||||||
& winget upgrade --include-unknown --source=winget
|
|
||||||
}
|
|
||||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||||
Write-Host "`n⏳ Querying updates from Microsoft Store..." -foregroundColor green
|
Write-Host "`n⏳ Querying updates from Microsoft Store..." -foregroundColor green
|
||||||
& winget upgrade --include-unknown --source=msstore
|
& winget upgrade --include-unknown --source=msstore
|
||||||
|
|
||||||
|
Write-Host "`n⏳ Querying updates from WinGet Store..." -foregroundColor green
|
||||||
|
& winget upgrade --include-unknown --source=winget
|
||||||
}
|
}
|
||||||
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
||||||
Write-Host "`n⏳ Querying updates from Chocolatey..." -foregroundColor green
|
Write-Host "`n⏳ Querying updates from Chocolatey..." -foregroundColor green
|
||||||
|
Loading…
Reference in New Issue
Block a user