Skip to content

Instantly share code, notes, and snippets.

@dariusz-wozniak
Created January 13, 2019 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariusz-wozniak/afc2ee0f06976082fefb67b73e1a7401 to your computer and use it in GitHub Desktop.
Save dariusz-wozniak/afc2ee0f06976082fefb67b73e1a7401 to your computer and use it in GitHub Desktop.
🍫 Upgrade all Chocolatey packages and summarize logs (see other Gists)
$chocoLogPath = "f:\Logs\chocoUpdate.log"
$chocoSummaryPath = "f:\Logs\ChocoUpdateSummary.log"
$chocoVersionsPath = "f:\Logs\ChocoUpdateVersionsSummary.csv"
Write-Host "Updating Chocolatey packages and log to $chocoLogPath"
"-------------------------------------------------------------------------" | Out-File -FilePath $chocoLogPath -Append
"Date-Time of Upgrading: " | Out-File -FilePath $chocoLogPath -Append -NoNewLine
(Get-Date).ToString("yyyy-MM-dd HH:mm:ss") | Out-File -Append $chocoLogPath
choco upgrade all --confirm --limit-output | Out-File -Append $chocoLogPath
scriptcs F:\Scripts\Setup\FilterChocoUpgradeLog.csx -- "$chocoLogPath" "$chocoSummaryPath"
scriptcs F:\Scripts\Setup\SummarizeChocoUgradeLog.csx -- "$chocoSummaryPath" "$chocoVersionsPath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment