Skip to content

Instantly share code, notes, and snippets.

@iambkramer
Forked from alimbada/Export-Chocolatey.ps1
Last active July 17, 2020 19:54
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save iambkramer/0c469f1d47e3616139fd99c2078579fc to your computer and use it in GitHub Desktop.
Save iambkramer/0c469f1d47e3616139fd99c2078579fc to your computer and use it in GitHub Desktop.
Export installed Chocolatey packages as chocolatey script
choco list -lo -r -y | % { $_.Split('|') | select -First 1 } | % { "choco install " + $_ + " -y" }
choco list -lo -r -y | % { $_.Split('|') | select -First 1 } | % { "choco install " + $_ + " -y" } | Out-file choco-software.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment