Created
July 25, 2018 14:08
-
-
Save vmandic/ef80f1097521c16063b3b1c3a687d244 to your computer and use it in GitHub Desktop.
Batch install vscode extensions with PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script for batch installing Visual Studio Code extensions | |
# Specify extensions to be checked & installed by modifying $extensions | |
$extensions = | |
"DotJoshJohnson.xml", | |
"EditorConfig.EditorConfig", | |
"HookyQR.beautify", | |
"Leopotam.csharpfixformat", | |
"ecmel.vscode-html-css", | |
"formulahendry.auto-close-tag", | |
"formulahendry.auto-rename-tag", | |
"jchannon.csharpextensions", | |
"jorgeserrano.vscode-csharp-snippets", | |
"k--kato.docomment", | |
"ms-mssql.mssql", | |
"ms-vscode.csharp", | |
"nepaul.editorconfiggenerator", | |
"rahulsahay.Csharp-ASPNETCore", | |
"robertohuertasm.vscode-icons", | |
"schneiderpat.aspnet-helper", | |
"temilaj.asp-net-core-vs-code-extension-pack" | |
$cmd = "code --list-extensions" | |
Invoke-Expression $cmd -OutVariable output | Out-Null | |
$installed = $output -split "\s" | |
foreach ($ext in $extensions) { | |
if ($installed.Contains($ext)) { | |
Write-Host $ext "already installed." -ForegroundColor Gray | |
} else { | |
Write-Host "Installing" $ext "..." -ForegroundColor White | |
code --install-extension $ext | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment