Skip to content

Instantly share code, notes, and snippets.

@jongalloway
Last active December 18, 2017 08:28
Show Gist options
  • Save jongalloway/5f31f9dfaa11e0637868 to your computer and use it in GitHub Desktop.
Save jongalloway/5f31f9dfaa11e0637868 to your computer and use it in GitHub Desktop.
Creates a list of cinst commands based on what you've already got installed.
clist -l -r -y | % { "cinst " + $_.SubString(0,$_.IndexOf("|")) + " /y" }
@sgwill
Copy link

sgwill commented May 30, 2014

That also removes the .install, .portable, etc. What about

(ls "$env:ChocolateyInstall\lib" | select basename).basename | % {'cinst ' + ($_ -replace "\.\d+", "")}  | sort -unique

@jongalloway
Copy link
Author

Updated with @sgwill fix and sort desc so .install, .commandline etc. are installed first.

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