You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe "PowerShell language features are disabled due to an unsupported LanguageMode: ConstrainedLanguage" error
If you look at the logs you see this:
[10:58:54] Language server starting...
powershell.exe started --
pid: 11060
exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
args: C:\Users\jreilly\.vscode\extensions\ms-vscode.powershell-1.4.1\scripts\Start-EditorServices.ps1 -EditorServicesVersion '1.4.1' -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '1.4.1' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'C:\Users\jreilly\.vscode\extensions\ms-vscode.powershell-1.4.1\modules' -EnableConsoleRepl -LogLevel 'Normal' -LogPath 'C:\Users\jreilly\.vscode\extensions\ms-vscode.powershell-1.4.1\logs\1503655134-00c42217-4248-45b7-a606-46f526fd4a5a1503655127754\EditorServices.log' -SessionDetailsPath 'C:\Users\jreilly\.vscode\extensions\ms-vscode.powershell-1.4.1\sessions\PSES-VSCode-3976-523561' -FeatureFlags @()
PowerShell language features are disabled due to an unsupported LanguageMode: ConstrainedLanguage
powershell.exe terminated or terminal UI was closed
Interestingly, I have my terminal configured using userSettings.json:
And I can open those terminals just fine. Note that the erroring version is using a different exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe.
Can we configure the integrated to use the sysnative version as well? Would that solve the problem?
The text was updated successfully, but these errors were encountered:
You're getting this error because we don't support ConstrainedLanguage mode at the moment. Open powershell.exe, run this code and see what it returns: $host.Runspace.LanguageMode
The terminal.integrated.shell.windows setting is for VS Code's default Integrated Terminal experience, it doesn't have an effect on the PowerShell extension.
Is there a roadmap for Powershell extension to support "Constrained Language Mode"? Because Powershell_ISE supports language features even in constrained language mode. Because many developers are working inside organizations which naturally use AppLocker policies for security, which enforces Constrained Language Mode, which removes many advantages of using VS Code for powershell development..
Raising here after being directed to here: microsoft/vscode#33143
Steps to Reproduce:
If you look at the logs you see this:
Interestingly, I have my terminal configured using
userSettings.json
:And I can open those terminals just fine. Note that the erroring version is using a different exe:
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
.Can we configure the integrated to use the
sysnative
version as well? Would that solve the problem?The text was updated successfully, but these errors were encountered: