Skip to content

Instantly share code, notes, and snippets.

@AnthonyMastrean
Last active September 11, 2017 15:57
Show Gist options
  • Save AnthonyMastrean/5387874 to your computer and use it in GitHub Desktop.
Save AnthonyMastrean/5387874 to your computer and use it in GitHub Desktop.
Export installed Chocolatey packages to a packages.config
$packages = Get-ChildItem (Join-Path $ENV:chocolateyinstall 'lib')
@AnthonyMastrean
Copy link
Author

Some thoughts...

  • nuget can't be used to report the version and string splitting will get hard with package names containing dots. We'll have to unpack every package and inspect it's nuspec XML file directly?
  • We can't tell where the package came from (it's source: webpi, gem, etc). That might make this useless?
  • shell.application cannot unzip a non .zip file?

@CollinChaffin
Copy link

I know this is a very old Gist, but for anyone searching all this command does is output the actual DIR listing to the variable and will not generate the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment