{ claus.conrad }

Chocolatey

https://chocolatey.org/

Notes

apt-like package installer for Windows with a community repository and a commercial on-premises solution

Resources

FAQ

Back up list of installed apps

C:\ProgramData\chocolatey\bin\choco.exe list -li > C:\Users\mail\OneDrive\Backup\claus10\chocolatey\$(date -Format "yyyyMMdd").txt

Automate the backup using a scheduled task

Save the code above in a script file. Adjust the paths (to the script and target directory) below. Run these commands to register a scheduled task.

$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-WindowStyle Hidden C:\Users\mail\Sites\administration\backup\claus10-chocolatey.ps1"

$trigger = New-ScheduledTaskTrigger -Daily -At '20:20'

$settings = New-ScheduledTaskSettingsSet -RunOnlyIfNetworkAvailable -MultipleInstances IgnoreNew -ExecutionTimeLimit (New-Timespan -Minutes 1)

$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings -Description "Back up list of installed apps"

Register-ScheduledTask -TaskName "Backup Chocolatey" -InputObject $task