Description
Similar to #2503 where install-args are included in export-file, I would like to have pinned-state included in export.
I'm aware that pinned state isn't known at install time, but it would be helpful to get the same state on a new computer as before.
For now I'm helping myself without "choco export" (I've using this longer than "choco export" exists):
(choco pin -y |%{$_ -replace '(.+?)|(.+)','choco install $1 --version $2'} | select -Skip 1) >C:\Backup\choco.install.ps1
(choco pin -y |%{$_ -replace '(.+?)|.+','choco pin add -n=''$1'''} | select -Skip 1)>>C:\Backup\choco.install.ps1
"choco install -y",[string]::Join(" ", (clist -l -r |%{$_ -replace '(.+?)|.+','$1'} | select)) -join " " >>C:\Backup\choco.install.ps1
- first line writes install command for all pinned packages
- second line writes a "pin" for all pinned packages
- third line writes rest of packages
- On new computer I just have to execute C:\Backup\choco.install.ps1 (I don't have special install arguments, pins where more important to me)
Would be nice if choco implements an export fully (with pins).
Thanks!