Skip to content

shellIntegration.ps1 is not digitally signed #174021

@deejaybeam

Description

@deejaybeam

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.75.1
  • OS Version: Windows_NT x64 10.0.20348

Steps to Reproduce:

  1. Set Execution Policy via GPO to "AllSigned"
  2. Start VSCode

This appears since 1.74. I hoped it was just forgotten to sign shellIntegration.ps1, but with current release the issue continues.

We have a company policy to set execution of powershell-scripts via GPO to "AllSigned" so it is not possible to bypass or change the execution-policy on the computer.

We are also monitor this event on our systems which triggers an alert everytime VSCode is started, because of the execution of an unsigned powershell script.

Relevant EventLogs:

Error Message = File C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1 cannot be loaded. The file C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
Fully Qualified Error ID = UnauthorizedAccess
Recommended Action = 


Context:
        Severity = Warning
        Host Name = ConsoleHost
        Host Version = 5.1.20348.643
        Host ID = 50954c61-f870-4707-885a-02d2e38b7fd4
        Host Application = C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command try { . "c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1" } catch {}
        Engine Version = 5.1.20348.643
        Runspace ID = 2bb84ced-b167-4b5e-8c57-ccb090c1fd31
        Pipeline ID = 2
        Command Name = 
        Command Type = 
        Script Name = 
        Command Path = 
        Sequence Number = 15
        User = DOMAIN\USER
        Connected User = 
        Shell ID = Microsoft.PowerShell


User Data:
Error Message = Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope.  Due to the override, your shell will retain its current effective execution policy of AllSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy".
Fully Qualified Error ID = ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
Recommended Action = Contact your system administrator.


Context:
        Severity = Warning
        Host Name = Visual Studio Code Host
        Host Version = 2023.1.0
        Host ID = c5a89ab3-2377-4a74-9319-250218a2387e
        Host Application = C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command Import-Module 'c:\Users\USER\.vscode\extensions\ms-vscode.powershell-2023.1.0\modules\PowerShellEditorServices\PowerShellEditorServices.psd1'; Start-EditorServices -HostName 'Visual Studio Code Host' -HostProfileId 'Microsoft.VSCode' -HostVersion '2023.1.0' -AdditionalModules @('PowerShellEditorServices.VSCode') -BundledModulesPath 'c:\Users\USER\.vscode\extensions\ms-vscode.powershell-2023.1.0\modules' -EnableConsoleRepl -StartupBanner "PowerShell Extension v2023.1.0
Copyright (c) Microsoft Corporation.

https://aka.ms/vscode-powershell
Type 'help' to get help.
" -LogLevel 'Normal' -LogPath 'c:\Users\USER\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\logs\1676010691-aed66317-eb79-4c4f-bc78-3b4cd369c81c1676010688614\EditorServices.log' -SessionDetailsPath 'c:\Users\USER\AppData\Roaming\Code\User\globalStorage\ms-vscode.powershell\sessions\PSES-VSCode-4876-818833.json' -FeatureFlags @() 
        Engine Version = 5.1.20348.643
        Runspace ID = b2b4db5d-31d5-49bb-b635-c26b9be5952d
        Pipeline ID = 6
        Command Name = Set-ExecutionPolicy
        Command Type = Cmdlet
        Script Name = 
        Command Path = 
        Sequence Number = 71
        User = DOMAIN\USER
        Connected User = 
        Shell ID = Microsoft.PowerShell


User Data:

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insidersterminal-shell-pwshAn issue in the terminal specific to PowerShell, including shell integrationverification-neededVerification of issue is requestedverifiedVerification succeededvscode-buildVS Code build process issueswindowsVS Code on Windows issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions