PowerShell for Visual Studio CodeThis extension provides rich PowerShell language support for Visual Studio Code (VS Code). Now you can write and debug PowerShell scripts using the excellent IDE-like interface that VS Code provides. This extension is powered by the PowerShell language server,
PowerShell Editor Services.
This leverages the
Language Server Protocol
where Also included in this extension is the PowerShell ISE theme for Visual Studio Code. It is not activated by default, but after installing this extension either click "Set Color Theme" or use the theme picker and select "PowerShell ISE" for a fun and familiar experience. Platform SupportThe extension should work anywhere VS Code itself and PowerShell Core 7.2 or higher is supported. For Windows PowerShell, only version 5.1 is supported. Please note that PowerShell Core 6, 7.0, and 7.1 have reached end-of-support. Our test matrix includes the following:
Read the installation instructions to get more details on how to use the extension on these platforms. For Windows PowerShell 5.1, .NET Framework 4.8 or higher is required. Read the troubleshooting guide for answers to common questions. Features
Installing the ExtensionYou can install the official release of the PowerShell extension by following the steps in the Visual Studio Code documentation. In the Extensions pane, search for "PowerShell" extension and install it there. You will get notified automatically about any future extension updates! You can also install a VSIX package from our releases page by following the Install from a VSIX instructions. The easiest way is through the command line:
Script-based InstallationIf you're on Windows 7 or greater with the PowerShellGet module installed, you can easily install both Visual Studio Code and the PowerShell extension by running the following command:
You will need to accept the prompts that appear if this is your first time running
the Alternatively you can download and execute the script directly from the web
without the use of
Reporting ProblemsIf you experience any problems with the PowerShell Extension, see the troubleshooting docs for information on diagnosing and reporting issues. Security NoteFor any security issues, please see here. Example ScriptsThere are some example scripts in the extension's This folder can be found at the following path:
To open/view the extension's examples in Visual Studio Code, run the following from your PowerShell session:
Contributing to the CodeCheck out the development documentation for more details on how to contribute to this extension! Maintainers
Emeriti
LicenseThis extension is licensed under the MIT License. Please see the third-party notices file for details on the third-party binaries that we include with releases of this project. Code of ConductThis project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. |