PowerShell Pro Tools
Ironman SoftwareGitHub
  • About
  • System Requirements
  • PowerShell Tools Documentation
    • Visual Studio
      • Analysis
      • Debugging
        • Local Debugging
        • Remote Debugging
      • Format Document
      • Go to Definition
      • Packaging in Visual Studio
      • PowerShell 7 Support
      • PowerShell Interactive Window
      • Project System
        • Advanced
        • Debug
        • Build Events
      • Settings
        • General
        • .editorconfig
        • Analysis
        • Diagnostics
      • Tool Windows
      • Refactoring
      • Unit Test Adapter
      • User Interface Design
        • Windows Forms
  • PowerShell Pro Tools Documentation
    • Visual Studio Code
      • Automating Visual Studio Code
      • Code Conversion
      • Debugging
        • Run in New Terminal
        • One-Click Attach
      • Decompiler
      • Diagnostics
      • Enhanced Hover
      • Generating a UI from a function
      • Generate a Tool from a Function
      • Packaging in Visual Studio Code
      • Pin Session
      • PowerShell Explorer
      • Profiler
      • Sign On Save
      • RapidSense
      • Refactoring
      • Rename Symbols
      • Quick Scripts
      • Windows Forms Designer
    • Installers
    • Packaging
      • Package.psd1
      • PowerShell Packager
      • Package Hosts
      • Package as Service
      • Packaging on Linux
      • Packaging on Mac OS X
      • Continuous Integration
      • Anti-Virus
    • PowerShell Module
      • Global Hotkeys
      • Show-PSEditor
      • Show-PSScriptPad
      • Show-TUIDesigner
      • ConvertTo-CSharp
      • ConvertTo-PowerShell
      • Merge-Script
      • Install-PoshProToolsLicense
      • about_MergeScriptConfig
      • Show-WinFormDesigner
    • PowerShell Protect
      • Getting Started
      • Installation
      • Actions
      • Rules
      • Configuration
    • PSCommander
    • PSScriptPad
    • Installation and Licensing
      • Visual Studio Offline Installation
  • Changelog
    • PowerShell Tools for Visual Studio
    • PowerShell Pro Tools for Visual Studio Code
    • PowerShell Packager
    • PSScriptPad
    • PowerShell Pro Tools Module
Powered by GitBook
On this page
  • Accessing the PowerShell Interactive Window
  • Executing Commands
  • Connecting to a Remote Machine
  • Clear the Screen
  • Interact with Visual Studio
  1. PowerShell Tools Documentation
  2. Visual Studio

PowerShell Interactive Window

PreviousPowerShell 7 SupportNextProject System

Last updated 11 months ago

The PowerShell Interactive Window provides a console like experience within Visual Studio. The interactive window can execute PowerShell scripts and commands, connect to remote machines and interact with the Visual Studio environment.

Accessing the PowerShell Interactive Window

To access the PowerShell interactive window, click View->PowerShell->PowerShell Interactive Window. You can also use the default key combination Ctrl+Shift+\.

Executing Commands

You can execute commands in the PowerShell interactive window just like any other PowerShell prompt. PowerShell Tools IntelliSense is available in the interactive window. You can simply press enter to execute a command. The interactive window has access to the current PowerShell session. Any scripts run through the Visual Studio debugger will influence the environment of the interactive window. Variables and functions defined in these scripts can be called in the interactive window.

Connecting to a Remote Machine

The interactive window can connect to a remote machine by clicking the Enter PowerShell Session button or using Enter-PSSession. Clicking the Enter PowerShell Session button will prompt you for a computer name.

You can then enter your credentials. You will be connected to the remote machine using Enter-PSSession.

You can disconnect from a remote session with the Exit PowerShell Session button.

Clear the Screen

You can clear the screen with the Clear Screen button.

Interact with Visual Studio

The Visual Studio DTE automation variable is available in the entire PowerShell session, including the interactive window, as $dte. The DTE object exposes useful functionality such as Solutions, Projects, Files, Commands and Windows.