Search the VS Code Marketplace for PowerShell and you get dozens of results, some of them abandoned years ago. We sorted out which ones still earn a spot in a scripting setup.
Quick answer: the best PowerShell extensions for VS Code start with Microsoft’s PowerShell extension (ms-vscode.powershell), which already includes IntelliSense, PSScriptAnalyzer, formatting and the debugger. Add Pester Tests for a test explorer, Error Lens for inline warnings, and GitLens if your scripts live in Git:
code --install-extension ms-vscode.powershell
We checked every extension’s current Marketplace status in October 2026, and we built the shareable setup files below in PowerShell 7.6 and Windows PowerShell 5.1. We didn’t install any extension or module for this post.
What You Need Before You Start
You need Visual Studio Code and at least one PowerShell host. The PowerShell extension supports PowerShell 7.2 and later on Windows, macOS and Linux, plus Windows PowerShell 5.1 with .NET Framework 4.8 on a best-effort basis. Not sure which one you run? Here’s how to check your PowerShell version.
A quick read-only check tells you whether the modules some extensions lean on are already there. It prints only True or False:
$pester = Get-Module -ListAvailable -Name Pester
[pscustomobject]@{
Edition = $PSVersionTable.PSEdition
ScriptAnalyzer = [bool](Get-Module -ListAvailable -Name PSScriptAnalyzer)
Pester52Plus = [bool]($pester | Where-Object Version -ge '5.2.0')
InboxPester340 = [bool]($pester | Where-Object Version -eq '3.4.0')
} | Format-List
Output in PowerShell 7:
Edition : Core
ScriptAnalyzer : False
Pester52Plus : False
InboxPester340 : True

Windows PowerShell 5.1 returned the same values except Edition, which reads Desktop. InboxPester340 is True on Windows 10 and 11 because Windows ships Pester 3.4.0, but Pester Tests needs 5.2.0 or later. ScriptAnalyzer False is fine, since the PowerShell extension brings its own copy.
1. PowerShell Extension by Microsoft
This is the one extension every PowerShell user needs, and Microsoft calls VS Code with it the recommended editor for PowerShell scripts. It gives you syntax highlighting, IntelliSense for cmdlets, Go to Definition, Find References, an outline view and built-in snippets. F8 runs the selected lines and Ctrl+F1 opens help for the command under the cursor.
It also ships PSScriptAnalyzer inside its own bundle, so warnings show in the Problems view without an Install-Module step. Formatting follows the powershell.codeFormatting.preset setting (OTBS, Allman, Stroustrup or Custom). For running and stepping through scripts, see o