mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 17:38:19 +02:00
Updated list-updates.ps1
This commit is contained in:
parent
372ab71fc2
commit
3844dabba3
@ -28,14 +28,21 @@ try {
|
||||
} elseif ($IsMacOS) {
|
||||
throw "Sorry, MacOS not supported yet"
|
||||
} else {
|
||||
Write-Host "`n === Application Updates from WinGet Store ===" -foregroundColor green
|
||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||
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
|
||||
}
|
||||
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
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user