Skip to content

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ΒΆ

Batchfile
choco install -y [app1] [app2] [app3] ...

Search application that you are looking for

Batchfile
choco search [keyword]  // chocho search fabric

List all installed applications

Batchfile
choco list -li // with version

Export all installed applications as powershell scriptΒΆ

PowerShell
PS> choco list --local-only --idonly | % { "choco install -y " + $_ } > choco_install.ps1 
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 application

Update all applicationsΒΆ

Batchfile
cup -y all

we can install vs code extensions from command as well

Batchfile
code --install-extension [Unique Identifier] // Eg Angular.ng-template

Export vs code extensions:ΒΆ

PowerShell
PS> code --list-extensions | % { "code --install-extension " + $_ } > vscode_extensions_install.ps1
Run vscode_extensions_install.ps1 to install all exported extensions.

similarly, for Visual Studio extensions or packages

Batchfile
choco install -y visualstudio2017professional --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
But, I prefer to use Settings Sync πŸ‘

Here is better way as config file with application versionsΒΆ

PowerShell
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>"
And to use: Export
PowerShell
choco-export.ps1 > packages.config
To import:
PowerShell
choco install packages.config

Tip

supported code block extensions Code block types
supported diagrams MermaidJS
Emoji cheat sheet Emojis

Style Examples

Warning

If problem problem viewing diagrams, change setting > Mermaid Preview Enhanced: Open Mermaid Config

Text Only
MERMAID_CONFIG = {
  startOnLoad: true,
  themeCSS: { a }
}