From 156ca50f45d1e0305728f0ad80ff9d9a12f6aacc Mon Sep 17 00:00:00 2001 From: scott davis Date: Wed, 5 Feb 2025 09:45:25 -0800 Subject: [PATCH] minor fix --- patching.ps1 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/patching.ps1 b/patching.ps1 index 64bd2f9..2341d70 100644 --- a/patching.ps1 +++ b/patching.ps1 @@ -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) { @@ -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..."