PowerShell / PowerShell/vscode-powershell

Microsoft Endpoint Privilege Management - CLI Integration with Virtual Accounts

Open
#5,299 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs: Triage
Dominant language
TypeScript
Stars
1.9k
Forks
547
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.
Summary

When we deploy Microsoft Endpoint Privilege Management with rules that allow for end users to elevate CLI (Powershell, Command, Terminal...) VS Code does not dock and link the interfaces to the VS Code instance. Instead a new window of the CLI opens and does not link to VS Code so code can not be ran/debugged/executed from inside of VS Code.

PowerShell Version
Name                           Value
----                           -----
PSVersion                      7.5.3
PSEdition                      Core
GitCommitId                    7.5.3
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Name             : ConsoleHost
Version          : 7.5.3
InstanceId       : cba9322f-cf07-4dcf-9645-9e1407bc14a8
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
1.105.1
x64
Extension Version
ms-vscode.powershell@2025.4.0
Steps to Reproduce
  1. Have a deployed policy that allows EMP to run a CLI as elevated
  2. Open VS Code
Visuals

After Opening and running a simple command
Image

Logs

2025-10-21 10:13:04.019 [info] Visual Studio Code: v1.105.1 64-bit on Windows 64-bit
2025-10-21 10:13:04.019 [info] PowerShell Extension: v2025.4.0
2025-10-21 10:13:04.142 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2025-10-21 10:13:04.744 [info] PowerShell process started with PID: 34660
2025-10-21 10:13:05.069 [warning] PowerShell process terminated or Extension Terminal was closed, PID: 34660
2025-10-21 10:13:05.237 [error] Extension Terminal is undefined.
2025-10-21 10:13:05.326 [error] PowerShell Language Server process didn't start!
2025-10-21 10:13:38.961 [info] Starting 'PowerShell (x64)' at: C:\Program Files\PowerShell\7\pwsh.exe
2025-10-21 10:13:39.159 [info] PowerShell process started with PID: 34632
2025-10-21 10:13:39.486 [warning] PowerShell process terminated or Extension Terminal was closed, PID: 34632
2025-10-21 10:13:39.631 [error] Extension Terminal is undefined.
2025-10-21 10:13:39.702 [error] PowerShell Language Server process didn't start!
2025-10-21 10:13:39.702 [error] PowerShell session unavailable for debugging!

Logs did not generate here: %APPDATA%\Code\User\globalStorage\ms-vscode.powershell\logs with the races from instructions here: https://github.com/PowerShell/vscode-powershell/blob/main/docs/troubleshooting.md#logs -- It looks like the disconnected CLI is preventing the traces from being generated. This also seemed to affected the Language Server Protocol payload logs as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/troubleshooting.md and reproduce the issue using the listed Microsoft Endpoint Privilege Management policy on Windows. Review the PowerShell extension startup logs and the reported terminal and language-server failures; done means an elevated CLI remains linked to VS Code so commands, debugging, and execution work inside the instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.