Cannot run PowerShellEditorServices when execution policy is set to AllSigned
See original GitHub issueSystem Details
- Operating system name and version: Windows 7 (x64)
- VS Code version: 1.17.0
- PowerShell extension version: 1.4.3
- Output from
$PSVersionTable
:
PS C:\Users\q794776> $PSVersionTable
Name Value
PSVersion 5.0.10586.117 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.10586.117 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:
PowerShell Integrated Console does not work.....
code -v
$pseditor.EditorServicesVersion
code --list-extensions --show-versions
$PSVersionTable
Issue Description
Terminal does not work. It worked before I performed the VScode upgrade which was done today.
Attached Logs
10/9/2017 3:28:03 PM [NORMAL] - Visual Studio Code v1.17.0 64-bit 10/9/2017 3:28:03 PM [NORMAL] - PowerShell Extension v1.4.3 10/9/2017 3:28:03 PM [NORMAL] - Operating System: Windows 64-bit 10/9/2017 3:28:03 PM [NORMAL] - Language server starting – 10/9/2017 3:28:03 PM [NORMAL] - exe: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe 10/9/2017 3:28:03 PM [NORMAL] - args: C:\Users\q794776.vscode\extensions\ms-vscode.powershell-1.4.3\scripts\Start-EditorServices.ps1 -EditorServicesVersion ‘1.4.1’ -HostName ‘Visual Studio Code Host’ -HostProfileId ‘Microsoft.VSCode’ -HostVersion ‘1.4.3’ -AdditionalModules @(‘PowerShellEditorServices.VSCode’) -BundledModulesPath ‘C:\Users\q794776.vscode\extensions\ms-vscode.powershell-1.4.3\modules’ -EnableConsoleRepl -LogLevel ‘Normal’ -LogPath ‘C:\Users\q794776.vscode\extensions\ms-vscode.powershell-1.4.3\logs\1507577283-8fc44e83-a80e-4a7f-bcf2-67761b34ccaf1507577267715\EditorServices.log’ -SessionDetailsPath ‘C:\Users\q794776.vscode\extensions\ms-vscode.powershell-1.4.3\sessions\PSES-VSCode-4180-886972’ -FeatureFlags @() 10/9/2017 3:28:03 PM [NORMAL] - powershell.exe started, pid: 9620 10/9/2017 3:29:03 PM [NORMAL] - Language server startup failed. 10/9/2017 3:29:03 PM [ERROR] - The language service could not be started: 10/9/2017 3:29:03 PM [ERROR] - Timed out waiting for session file to appear.
Issue Analytics
- State:
- Created 6 years ago
- Comments:82 (8 by maintainers)
After workshopping a good way to trust the MS certificate (the obvious problem being that any PowerShell script to trust the certificate would also be untrusted), it turns out a very simple way is to just interactively import the editor services module and select
Always run
(verifying that the signing certificate is indeed a Microsoft Corporation one).So:
Then:
That worked, I left it at CurrentUser, since I’m the only user of this computer. No errors, and the integrated console loads without issue now as well.