mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-14 14:08:17 +02:00
Update list-updates.ps1
This commit is contained in:
parent
cbe5c46556
commit
c2e50200e8
@ -3,6 +3,7 @@
|
|||||||
Lists software updates
|
Lists software updates
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script lists available updates for the local machine.
|
This PowerShell script lists available updates for the local machine.
|
||||||
|
Use "install-updates.ps1" to install the listed updates.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-updates
|
PS> ./list-updates
|
||||||
.LINK
|
.LINK
|
||||||
@ -13,13 +14,13 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
Write-Host "⏳ Querying updates for installed packages..."
|
Write-Host "⏳ Querying package updates..."
|
||||||
& sudo apt update
|
& sudo apt update
|
||||||
& sudo apt list --upgradable
|
& sudo apt list --upgradable
|
||||||
Write-Host "⏳ Querying updates for installed snaps..."
|
Write-Host "⏳ Querying Snap updates..."
|
||||||
sudo snap refresh --list
|
sudo snap refresh --list
|
||||||
} else {
|
} else {
|
||||||
Write-Progress "⏳ Querying available updates..."
|
Write-Progress "⏳ Querying application updates..."
|
||||||
" "
|
" "
|
||||||
& winget upgrade
|
& winget upgrade
|
||||||
Write-Progress -Completed " "
|
Write-Progress -Completed " "
|
||||||
|
Loading…
Reference in New Issue
Block a user