-1

I have a list of chocolatey packages generated from the command below;

choco list --local-only

Is there a command line to install packages from the list onto a new machine?

I am using Windows 10.

user3848207
  • 3,737
  • 17
  • 59
  • 104
  • [How to get a list of packages from one machine and install in another with Chocolatey?](https://stackoverflow.com/questions/43167087/how-to-get-a-list-of-packages-from-one-machine-and-install-in-another-with-choco) – ggorlen Jul 08 '23 at 03:04

1 Answers1

4
  1. Create the list of packages on machine A:

choco list --idonly --localonly --limitoutput >chocolist.txt

  1. Copy the file "chocolist.txt" to machine B.

  2. On machine B, start a PowerShell cmd window in Administrator mode.

  3. Install the list of package on machine B:

Get-Content chocolist.txt | foreach {choco upgrade -y --limitoutput $_}

Jason
  • 336
  • 2
  • 5