Add choco-auto-update.ps1

This commit is contained in:
2026-03-30 19:45:22 +00:00
parent 0b26a6a64e
commit e1905f17ef

12
choco-auto-update.ps1 Normal file
View File

@@ -0,0 +1,12 @@
# MABDC Chocolatey Auto-Update Script
# Runs nightly at 2:00 AM via scheduled task
$LogFile = "C:\MABDC\Logs\auto-update.log"
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
Add-Content -Path $LogFile -Value "[$timestamp] Starting auto-update..."
try {
$result = choco upgrade all -y --source=mabdc --no-progress 2>&1
Add-Content -Path $LogFile -Value "[$timestamp] Update complete: $result"
} catch {
Add-Content -Path $LogFile -Value "[$timestamp] ERROR: $_"
}