Skip to content

Instantly share code, notes, and snippets.

Andrew Kramarev akramarev

Block or report user

Report or block akramarev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@akramarev
akramarev / Export-Chocolatey.ps1
Created Jan 19, 2019 — forked from alimbada/Export-Chocolatey.ps1
Export installed Chocolatey packages as packages.config - thanks to Matty666
View Export-Chocolatey.ps1
#Put this in Export-Chocolatey.ps1 file and run it:
#Export-Chocolatey.ps1 > packages.config
#You can install the packages using
#choco install packages.config -y
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>"
Write-Output "<packages>"
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" }
Write-Output "</packages>"
You can’t perform that action at this time.