Last active
October 28, 2021 09:38
-
-
Save mdschweda/2311e3f2c7062bf7367e44f8a7aa8b55 to your computer and use it in GitHub Desktop.
Batch install Visual Studio Code extensions
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 = | |
# Look & Feel | |
"azemoh.one-monokai", | |
"emmanuelbeziat.vscode-great-icons", | |
# Editing | |
"HookyQR.beautify", | |
"ow.vscode-subword-navigation", | |
"formulahendry.auto-close-tag", | |
"formulahendry.auto-rename-tag", | |
# Language support | |
"ms-vscode.csharp", | |
# Extra functionality | |
"humao.rest-client", | |
"cssho.vscode-svgviewer" | |
$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