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:


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


I’ll install it from the command line using the “Very Silent” option:


vscode4aAfter 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:


Be sure to see the Windows PowerShell Team Blog titled “Announcing PowerShell language support for Visual Studio Code and more!” for the specific PowerShell related features that are available in Visual Studio Code.



  1. Dean

    Fantastic. Thanks for the heads up Mike. Always appreciate your posts.

  2. Wesley


    Is it only me or VSC doesn’t load PowerShell modules ? I can’t seem to be able to get auto-completion when working with specific modules (DFSN for example).


  3. Richard

    I am new to Visual Studio Code and PS. So please allow me three questions.

    1: How do I run a PS script? F8 does it line by line. But he complet script?

    2: How do I enter commendline arguments?

    3: When I try to debug a PS script, nothing happens. I assume that this is a config issue. When loading the ‘launch.json’ file there is a line “”program”: “SET_SCRIPT_FILE_PATH_HERE.ps1″” What should I enter here? The name ot the script that I am debugging right now? With the complete path like “d:\data\projects\project_12345\tasks\powershell\task123\findfiles.ps1”? I work on 5-20 such files a day.

    Thank you in advance.

  4. Ray Crawford

    Is there a way to make it install without firing up VSC at the end?


Leave a Reply

%d bloggers like this: