Files
scripts/choco-auto-update.ps1

13 lines
480 B
PowerShell
Raw Normal View History

2026-03-30 19:45:22 +00:00
# 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: $_"
}