Wayback Machine
205 captures
12 Oct 2018 - 24 Jul 2025
Jul SEP Oct
Previous capture 13 Next capture
2021 2022 2023
success
fail
About this capture
COLLECTED BY
Organization: Archive Team
Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

History is littered with hundreds of conflicts over the future of a community, group, location or business that were "resolved" when one of the parties stepped ahead and destroyed what was there. With the original point of contention destroyed, the debates would fall to the wayside. Archive Team believes that by duplicated condemned data, the conversation and debate can continue, as well as the richness and insight gained by keeping the materials. Our projects have ranged in size from a single volunteer downloading the data to a small-but-critical site, to over 100 volunteers stepping forward to acquire terabytes of user-created data to save for future generations.

The main site for Archive Team is at archiveteam.org and contains up to the date information on various projects, manifestos, plans and walkthroughs.

This collection contains the output of many Archive Team projects, both ongoing and completed. Thanks to the generous providing of disk space by the Internet Archive, multi-terabyte datasets can be made available, as well as in use by the Wayback Machine, providing a path back to lost websites and work.

Our collection has grown to the point of having sub-collections for the type of data we acquire. If you are seeking to browse the contents of these collections, the Wayback Machine is the best first stop. Otherwise, you are free to dig into the stacks to see what you may find.

The Archive Team Panic Downloads are full pulldowns of currently extant websites, meant to serve as emergency backups for needed sites that are in danger of closing, or which will be missed dearly if suddenly lost due to hard drive crashes or server failures.

Collection: Archive Team: URLs
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20220913163036/https://code.visualstudio.com/docs/languages/powershell
Skip to content  Visual Studio Code
  • Docs
  • Updates
  • Blog
  • API
  • Extensions
  • FAQ
  • Learn
  • Search
  • Search Search
  • Download VS Code Download VS Code Download

Version 1.71 is now available! Read about the new features and fixes from August.

Dismiss this update
'; document.body.appendChild(div.children[0]); } function pushCodingPackEvent(language, os) { let id = `${language}-${os}-coding-pack`; var analytics = window.vscodeAnalytics; analytics && analytics.event( 'click', 'download', id, ); }
  • Overview
  • Setup
    • Overview
    • Linux
    • macOS
    • Windows
    • Raspberry Pi
    • Network
    • Additional Components
    • Enterprise
    • Uninstall
  • Get Started
    • Intro Videos
    • Tips and Tricks
    • User Interface
    • Themes
    • Settings
    • Key Bindings
    • Display Language
    • Telemetry
  • User Guide
    • Basic Editing
    • Extension Marketplace
    • IntelliSense
    • Code Navigation
    • Refactoring
    • Debugging
    • Version Control
    • Working with GitHub
    • VS Code for the Web
    • Tasks
    • Settings Sync
    • Snippets
    • Emmet
    • Command Line Interface
    • Workspace Trust
    • Multi-root Workspaces
    • Accessibility
  • Terminal
    • Terminal Basics
    • Terminal Profiles
    • Shell Integration
    • Appearance
  • Languages
    • Overview
    • JavaScript
    • JSON
    • HTML
    • CSS, SCSS and Less
    • TypeScript
    • Markdown
    • PowerShell
    • C++
    • Java
    • PHP
    • Python
    • Julia
    • R
    • Rust
    • Go
    • T-SQL
    • C#
    • .NET
  • Node.js / JavaScript
    • Working with JavaScript
    • Node.js Tutorial
    • Node.js Debugging
    • Node.js Deployment
    • Browser Debugging
    • Angular Tutorial
    • React Tutorial
    • Vue Tutorial
    • Ember Tutorial
    • Debugging Recipes
    • Extensions
  • TypeScript
    • Tutorial
    • Compiling
    • Editing
    • Refactoring
    • Debugging
  • Python
    • Tutorial
    • Editing Code
    • Linting
    • Debugging
    • Environments
    • Testing
    • Data Science
    • Python Interactive
    • Django Tutorial
    • Flask Tutorial
    • Create containers
    • Python on Azure
    • Settings Reference
  • Java
    • Getting Started
    • Navigate and Edit
    • Refactoring
    • Formatting and Linting
    • Project Management
    • Build Tools
    • Run and Debug
    • Testing
    • Spring Boot
    • Application Servers
    • Java on Azure
    • GUI Applications
    • Extensions
    • FAQ
  • C++
    • Intro Videos
    • GCC on Linux
    • GCC on Windows
    • GCC on Windows Subsystem for Linux
    • Clang on macOS
    • Microsoft C++ on Windows
    • Build with CMake
    • CMake Tools on Linux
    • Editing
    • Debugging
    • Configure debugging
    • Settings
    • Configure IntelliSense for cross-compiling
    • FAQ
  • Containers
    • Overview
    • Node.js
    • Python
    • ASP.NET Core
    • Debug
    • Docker Compose
    • Registries
    • Deploy to Azure
    • Choose a dev environment
    • Customize
    • Develop with Kubernetes
    • Tips and Tricks
  • Data Science
    • Overview
    • Jupyter Notebooks
    • Data Science Tutorial
    • Python Interactive
    • PyTorch Support
    • Azure Machine Learning
  • Azure
    • Extensions
    • Deployment
    • Remote Debugging for Node.js
    • Docker
    • MongoDB
    • Kubernetes
    • Azure Kubernetes Service
  • Remote
    • Overview
    • SSH
    • Containers
    • Windows Subsystem for Linux
    • GitHub Codespaces
    • VS Code Server
    • SSH Tutorial
    • Containers Tutorial
    • WSL Tutorial
    • Attach to Container
    • Create a Dev Container
    • Advanced Containers
    • devcontainer.json
    • devcontainer CLI
    • Tips and Tricks
    • FAQ

Topics

PowerShell in Visual Studio Code

PowerShell is a task-based command-line shell and scripting language built on .NET, which provides a powerful toolset for administrators on any platform.

The Microsoft PowerShell extension for Visual Studio Code (VS Code) provides rich language support and capabilities such as syntax completions, definition tracking, and linting for PowerShell. The extension works anywhere you can run VS Code and PowerShell 7 or higher. The extension also works for Windows PowerShell 5.1. The extension no longer supports the older versions of Windows PowerShell.

Our test matrix includes the following configurations:

  • Windows Server 2022 with Windows PowerShell 5.1 and PowerShell 7.2
  • Windows Server 2019 with Windows PowerShell 5.1 and PowerShell 7.2
  • macOS 11 with PowerShell Core 7.2
  • Ubuntu 20.04 with PowerShell Core 7.2

Installing the PowerShell extension

There are two versions of the extension:

  • PowerShell - the fully tested stable release
  • PowerShell Preview - a preview release containing new features and other changes, but not fully tested

Both extensions can be installed, but only one should be enabled. This allows you to switch from the stable to the preview version to try out new features.

Installing from within VS Code

The PowerShell extension can be installed from the Visual Studio Code Marketplace by clicking the Install Button. You can also install the PowerShell extension from within VS Code by opening the Extensions view with keyboard shortcut ⇧⌘X (Windows, Linux Ctrl+Shift+X), typing "PowerShell", and selecting the PowerShell extension:

PowerShell extension

Installing from the command line

The extension can also be installed from any command-line shell (including PowerShell, cmd, and bash) on any supported platform using the following command:

code --install-extension ms-vscode.powershell

If you are running the VS Code Insiders build, use this command instead:

code-insiders --install-extension ms-vscode.powershell

Major features

  • Syntax highlighting
  • Code snippets
  • IntelliSense for cmdlets and more
  • Rule-Based analysis provided by PowerShell Script Analyzer
  • Go to Definition of cmdlets and variables
  • Find references of cmdlets and variables
  • Document and Workspace symbol discovery
  • Run selected section of PowerShell code using F8
  • Launch online help for the symbol under the cursor using Ctrl + F1
  • Local script debugging and basic interactive console support
  • Enable ISE mode using ⇧⌘P (Windows, Linux Ctrl+Shift+P) then search for "Enable ISE Mode"

Debugging

The PowerShell extension uses the built-in debugging interface of VS Code to allow for debugging of PowerShell scripts and modules. For more information about debugging PowerShell, see Using VS Code.

Multi-version support

You can configure the PowerShell extension to use any supported version of PowerShell installed on your machine by following these instructions.

Or run the PowerShell: Show Session Menu command from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)).

CodeLens support

CodeLenses are a VS Code feature to provide actionable, contextual information that is displayed within the source code.

CodeLens support was added in version 1.3.0 of the PowerShell extension, read the PowerShell extension changelog for more information.

CodeLens features include:

  • Pester Run tests and Debug tests.

    Pester CodeLens Integration

  • Pester symbol support

    CodeLens Pester Symbol Support

  • Function reference

    CodeLens function reference support shows the number of times a function is referenced within your code and allows you to jump to specific references.

    CodeLens Function Reference Support

PSScriptAnalyzer integration

PSScriptAnalyzer is a PowerShell module that provides a static source code checker for modules and scripts. PSScriptAnalyzer has rules that verify the quality of PowerShell code. These rules are based on PowerShell best practices identified by the PowerShell Team and the community. PSScriptAnalyzer generates diagnostic records (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements.

The PowerShell extension includes PSScriptAnalyzer by default, and automatically performs analysis on PowerShell script files you edit in VS Code.

PSScriptAnalyzer comes with a collection of built-in rules that check various aspects of PowerShell source code such as presence of uninitialized variables, usage of PSCredential type, usage of Invoke-Expression, and others. The module also allows you to include or exclude specific rules.

To disable PSScriptAnalyzer, open your settings (⌘, (Windows, Linux Ctrl+,)), browse Extensions, select the PowerShell extension, and deselect the checkbox for Script Analysis: Enable (powershell.scriptAnalysis.enable).

PSScriptAnalyzer Settings

PSScriptAnalyzer also provides code formatting. You can invoke automatic document formatting with the Format Document command or the (⇧⌥F (Windows Shift+Alt+F, Linux Ctrl+Shift+I)) keyboard shortcut.

Pester integration

Pester is a framework for running unit tests to execute and Windows PowerShell 5.1 comes with Pester 3.40 pre-installed. To update Pester or to install the latest version on other platforms follow the Pester installation instructions.

Plaster integration

Plaster is a template-based file and project generator written in PowerShell. Its purpose is to streamline the creation of PowerShell module projects, Pester tests, DSC Configurations and more.

The PowerShell extension allows the creation of new Plaster projects using the PowerShell: Create New Project from Plaster Template command from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)).

Plaster Project

PowerShell extension settings

You can customize VS Code settings from the File > Preferences > Settings menu item (Code > Preferences > Settings on macOS).

You can also select the gear icon located in the lower left corner of the Activity Bar.

codeGear

You can also use the keyboard shortcut ⌘, (Windows, Linux Ctrl+,) to open your settings. You can still open the settings.json file by using Preferences: Open Settings (JSON) command from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) or by changing the default settings editor with the "workbench.settings.editor" setting.

Go to User and Workspace settings for more information on configuring VS Code settings.

Types.ps1xml and Format.ps1xml files

PowerShell .ps1xml files are used to extend the type system and define output formatting. For more information on these files, please refer to the official PowerShell documentation on Types.ps1xml and Format.ps1xml. You can get IntelliSense features when authoring .ps1xml files by installing the XML extension by Red Hat. After installing, add this configuration to your user settings:

"xml.fileAssociations": [
  {
    "systemId": "https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Format.xsd",
    "pattern": "**/*.Format.ps1xml"
  },
  {
    "systemId": "https://raw.githubusercontent.com/PowerShell/PowerShell/master/src/Schemas/Types.xsd",
    "pattern": "**/*.Types.ps1xml"
  }
]

This tells the XML extension to use the official XML schemas from the PowerShell repository for all .ps1xml files. This enables the following features in ps1xml files:

  • Syntax error reporting
  • Schema validation
  • Tag and attribute completion
  • Auto-close tags
  • Symbol highlighting
  • Document folding
  • Document symbols and outline
  • Renaming support
  • Document Formatting

Example scripts

Example scripts are included with the extension and can be found at the following path.

~/.vscode/extensions/ms-vscode.PowerShell-<version>/examples

To open or view the examples in VS Code, run the following from your PowerShell command prompt:

code (Get-ChildItem ~\.vscode\extensions\ms-vscode.PowerShell-*\examples)[-1]

You can also open the examples from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) with the PowerShell: Open Examples Folder command.

Open PowerShell Examples

Additional resources

More detailed documentation can be found in the PowerShell documentation. Start with Using VS Code.

Check out the troubleshooting guide for answers to common questions.

For more information on debugging, check out the Hey, Scripting Guy! two-part blog post series written by @keithHill on debugging with the PowerShell extension:

  • Debugging PowerShell script in Visual Studio Code - Part 1
  • Debugging PowerShell script in Visual Studio Code - Part 2
08/15/2022

In this article there are 5 sectionsIn this article

  • Installing the PowerShell extension
  • Major features
  • PowerShell extension settings
  • Example scripts
  • Additional resources
  • Hello from Seattle.
  • Follow @code
  • Support
  • Privacy
  • Manage Cookies
  • Terms of Use
  • License
Microsoft homepage Microsoft homepage © 2022 Microsoft