mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-25 19:38:17 +02:00
Updated install-updates.ps1 and list-updates.ps1
This commit is contained in:
parent
ea112a42bd
commit
af3fffb4dd
@ -11,7 +11,7 @@
|
||||
✅ Swap space has 1GB free (2% of 1GB used)
|
||||
✅ No pending system reboot
|
||||
|
||||
⏳ (2/2) Installing updates from winget and Microsoft Store...
|
||||
⏳ (2/2) Updating Microsoft Store apps...
|
||||
...
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
@ -55,19 +55,19 @@ try {
|
||||
& "$PSScriptRoot/check-pending-reboot.ps1"
|
||||
Start-Sleep -seconds 3
|
||||
""
|
||||
"⏳ (2/4) Updating Windows Store apps..."
|
||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||
"⏳ (2/4) Updating Microsoft Store apps..."
|
||||
if (Get-Command winget -errorAction SilentlyContinue) {
|
||||
& winget upgrade --all --source=msstore --include-unknown
|
||||
}
|
||||
""
|
||||
"⏳ (3/4) Updating Chocolatey packages..."
|
||||
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
||||
& choco upgrade all -y
|
||||
"⏳ (3/4) Updating WinGet Store apps..."
|
||||
if (Get-Command winget -errorAction SilentlyContinue) {
|
||||
& winget upgrade --all --source=winget --include-unknown
|
||||
}
|
||||
""
|
||||
"⏳ (4/4) Updating Winget packages..."
|
||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||
& winget upgrade --all --source=winget --include-unknown
|
||||
"⏳ (4/4) Updating Chocolatey packages..."
|
||||
if (Get-Command choco -errorAction SilentlyContinue) {
|
||||
& choco upgrade all -y
|
||||
}
|
||||
}
|
||||
[int]$elapsed = $stopWatch.Elapsed.TotalSeconds
|
||||
|
@ -7,7 +7,7 @@
|
||||
NOTE: Execute 'install-updates.ps1' to install the listed updates.
|
||||
.EXAMPLE
|
||||
PS> ./list-updates.ps1
|
||||
⏳ Querying updates from Microsoft Store...
|
||||
⏳ Querying Microsoft Store updates...
|
||||
|
||||
Name Id Version Available
|
||||
----------------------------------------------------------------
|
||||
@ -30,14 +30,14 @@ try {
|
||||
throw "Sorry, MacOS not supported yet"
|
||||
} else {
|
||||
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
||||
Write-Host "`n⏳ Querying updates from Microsoft Store..." -foregroundColor green
|
||||
Write-Host "`n⏳ Querying Microsoft Store updates..." -foregroundColor green
|
||||
& winget upgrade --include-unknown --source=msstore
|
||||
|
||||
Write-Host "`n⏳ Querying updates from WinGet Store..." -foregroundColor green
|
||||
Write-Host "`n⏳ Querying WinGet Store updates..." -foregroundColor green
|
||||
& winget upgrade --include-unknown --source=winget
|
||||
}
|
||||
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
||||
Write-Host "`n⏳ Querying updates from Chocolatey..." -foregroundColor green
|
||||
Write-Host "`n⏳ Querying Chocolatey updates..." -foregroundColor green
|
||||
& choco outdated
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user