mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-22 01:48:20 +02:00
Updated list-updates.ps1
This commit is contained in:
parent
372ab71fc2
commit
3844dabba3
@ -28,14 +28,21 @@ try {
|
|||||||
} elseif ($IsMacOS) {
|
} elseif ($IsMacOS) {
|
||||||
throw "Sorry, MacOS not supported yet"
|
throw "Sorry, MacOS not supported yet"
|
||||||
} else {
|
} else {
|
||||||
Write-Host "`n === Application Updates from WinGet Store ===" -foregroundColor green
|
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||||
& winget upgrade --include-unknown --source=winget
|
Write-Host "`n⏳ Querying updates from WinGet Store..." -foregroundColor green
|
||||||
|
& winget upgrade --include-unknown --source=winget
|
||||||
Write-Host "`n === Application Updates from Microsoft Store ===" -foregroundColor green
|
}
|
||||||
& winget upgrade --include-unknown --source=msstore
|
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||||
|
Write-Host "`n⏳ Querying updates from Microsoft Store..." -foregroundColor green
|
||||||
|
& winget upgrade --include-unknown --source=msstore
|
||||||
|
}
|
||||||
|
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
||||||
|
Write-Host "`n⏳ Querying updates from Chocolatey..." -foregroundColor green
|
||||||
|
& choco outdated
|
||||||
|
}
|
||||||
}
|
}
|
||||||
" "
|
" "
|
||||||
"NOTE: Execute script 'install-updates.ps1' to install the listed updates."
|
"💡 Execute the script 'install-updates.ps1' to install the listed updates."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user