PowerShell / PowerShell/vscode-powershell

Microsoft Endpoint Privilege Management - CLI Integration with Virtual Accounts

Aperta
#5,299 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Issue-Bug Needs: Triage
Lingua principale
TypeScript
Stelle
1.9k
Fork
548
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da docs/troubleshooting.md e riproduci il problema utilizzando la policy Microsoft Endpoint Privilege Management elencata su Windows. Esamina i log di avvio dell’estensione PowerShell e i fallimenti segnalati del terminale e del server del linguaggio; il lavoro è completato quando una CLI con privilegi elevati rimane collegata a VS Code, in modo che i comandi, il debug e l’esecuzione funzionino all’interno dell’istanza.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.