Install and manage applications using ChocolateyΒΆ
Run command as admin
Batchfile
$ @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Install packages/applicationsΒΆ
Search application that you are looking for
List all installed applications
Export all installed applications as powershell scriptΒΆ
Don't forget to remove first and last line from the file, one with choco version and other with applications count.Once exported run the file using powershell as admin to reinstall all the applicationUpdate all applicationsΒΆ
we can install vs code extensions from command as well
Export vs code extensions:ΒΆ
PowerShell
Run vscode_extensions_install.ps1 to install all exported extensions. PS> code --list-extensions | % { "code --install-extension " + $_ } > vscode_extensions_install.ps1
similarly, for Visual Studio extensions or packages
Batchfile
But, I prefer to use Settings Sync π choco install -y visualstudio2017professional --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
Here is better way as config file with application versionsΒΆ
PowerShell
And to use: Export To import: 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>"
Tip
supported code block extensions Code block types
supported diagrams MermaidJS
Emoji cheat sheet Emojis