Installing Visual Studio Code and the PowerShell Extension

Last week Microsoft released a new version of Visual Studio Code along with an extension for writing PowerShell in it. Visit to download Visual Studio Code. There's also an update link on that page if you happen to have a version prior to 0.10.1. The PowerShell extension for Visual Studio Code only works with PowerShell version 5. Either Windows 8.1 with the WMF 5 Production Preview installed or Windows 10 is sufficient.

The GUI installation of Visual Studio Code is a clickersize. There's also a long list of command line options to perform an unattended installation:

1.\VSCodeSetup.exe /?


This website is listed at the bottom of the following image:


I'll install it from the command line using the Very Silent option:

1.\VSCodeSetup.exe /VerySilent



After the installation finishes, a desktop icon will be created and Visual Studio Code will be launched automatically.

To install the PowerShell extension, from within Visual Studio Code use the key combination Cntl+Shift+P or select View > Command Palette... from the menu options:


Backspace over the > and type in ext install powershell and select the first entry:


That will download the extension and place it in the .vscode\extensions folder under your user profile:


Note: Internet access is required to install the extension otherwise you'll receive this error:


The following message is displayed once the installation is complete and you'll need to restart Visual Studio Code:


The best place to start is by opening up the examples folder in Visual Studio Code. The examples folder is located under your user profile in .vscode\extensions\ms-vscode.PowerShell\examples:


Now you'll be able to write PowerShell in Visual Studio Code: