Cannot run PowerShellEditorServices when execution policy is set to AllSigned

See original GitHub issue

System 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:closed
  • Created 6 years ago
  • Comments:82 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
rjmholtcommented, Jan 11, 2019

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:

ipmo ~/.vscode/ms-vscode.powershell*/modules/PowerShellEditorServices/PowerShellEditorServices.psd1

Then: accept_cert

2reactions
Ryoken0367commented, Jan 10, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Cannot run PowerShellEditorServices when execution ...
Cannot run PowerShellEditorServices when execution policy is set to AllSigned.
Read more >
PowerShell Install Coding – Index - Wilson Mar
“remotesigned” is important because if this script has not been digitally signed, one needs to set PS execution policy to “RemoteSigned” (or ...
Read more >
Powershell script to check service status on multiple servers
Windows PowerShell has four different execution policies: Execution Policy. Steps: Create a text file; ... To run outside script set policy to RemoteSigned....
Read more >
Powershell For Mac - Download software for MAC
Install PowerShell on MacOS; Execute script file; Version Logic: If Then Else; Strings; Curl ... one needs to set PS execution policy to...
Read more >
vscode-powershell - kandi - Open Weaver
It is not activated by default, but after installing this extension either click "Set Color Theme" or use the theme picker and select...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found