Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleedavis committed Feb 5, 2025
1 parent 5d84d2f commit 156ca50
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions patching.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ try {
$failedPackages += "Microsoft Store apps"
}

# Cleanup logs
Write-Output "=== Cleaning Up Deployment Logs ==="
try {
Remove-Item -Path "C:\ProgramData\Microsoft\Windows\AppRepository\*.rslc" -Force -ErrorAction SilentlyContinue
Write-Host "Deployment logs cleaned up successfully." -ForegroundColor Green
} catch {
Write-Host "Failed to clean up deployment logs: $_" -ForegroundColor Red
}

# Output results
Write-Output "=== Update Summary ==="
if ($skippedPackages.Count -gt 0) {
Expand All @@ -123,6 +114,11 @@ if ($failedPackages.Count -gt 0) {
Write-Host "All updates completed successfully!" -ForegroundColor Green
}

# List installed software and versions
Write-Output "=== Installed Software and Versions ==="
Get-WmiObject -Class Win32_Product | Select-Object Name, Version | Sort-Object Name | Format-Table


# Reboot if required
if ($rebootRequired) {
Write-Output "System requires a reboot. Rebooting now..."
Expand Down

0 comments on commit 156ca50

Please sign in to comment.