liveBook · Manning

PowerShell extension

As explained in Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

The PowerShell extension is a Visual Studio Code extension that provides PowerShell language support and development features.

The PowerShell extension gives Visual Studio Code PowerShell language support for scripting and development. Install the stable release from the Extensions panel, then keep it updated. section 2.4

Useful setup choices include:

  • Set new files to use PowerShell by default with "files.defaultLanguage": "powershell" in settings.json. section 2.4
  • Enable bracket colorization to make nested scripts easier to read. section 2.4

Verify the installation

Create an empty .ps1 file and type Get-P. IntelliSense should suggest commands such as Get-Process; if it does not, fix the setup before continuing. section 2.7

Figure 2.3 Installing the PowerShell extension

Use the installation figure to locate and select the stable PowerShell extension in VS Code. section 2.4

How Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools covers it

How deep it goes
Covers installation, updates, settings, and an IntelliSense check, but does not detail extension internals.
Examples
Uses a .ps1 file, Get-P autocomplete, Get-Process suggestions, and editor configuration settings.
What it assumes
Assumes Visual Studio Code is installed and recommends PowerShell 7; it verifies the extension from an empty script.
What you can do after
Operate Visual Studio Code for PowerShell editing, autocomplete, configuration, and extension maintenance.
How it connects
Connects Visual Studio Code with PowerShell scripting, IntelliSense, settings.json, and PowerShell 7.

Also explained in

Compare how 2 books explain PowerShell extension →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools. The section links point to the parts of the book it draws on.