Use Visual Studio Code with PowerShell

Completed

Visual Studio Code (VS Code) is a Microsoft script editor that provides a rich and interactive script editing experience. This experience is similar to the PowerShell Integrated Scripting Environment (ISE) when you use it with the PowerShell extension. VS Code supports the following PowerShell versions:

  • PowerShell 7 and newer for Windows, macOS, and Linux
  • PowerShell Core 6 for Windows, macOS, and Linux
  • Windows PowerShell 5.1 for Windows operating systems only

Note

Visual Studio Code is different from Visual Studio. You can download VS Code from the Visual Studio Code Download page and the PowerShell extension from the Visual Studio Marketplace. You can also install the extension directly from within VS Code.

ISE Mode in Visual Studio Code

After you install VS Code and the PowerShell extension, you can replicate the ISE experience by turning on ISE Mode.

Enabling ISE Mode makes several notable changes to the way VS Code works, including:

  • Mapping keyboard functions in VS Code so they match the ones used in the ISE.
  • Allowing you to replicate the VS Code user interface to resemble the ISE.
  • Enabling ISE-like tab completion.
  • Providing several ISE themes to make the VS Code editor look like the ISE.

Additional information: For more information on using Visual Studio Code and replicating the ISE experience, refer to Using Visual Studio Code for PowerShell Development.