Skip to content

Loading temporary ExtensionService script causes error loop when execution policy locked to AllSigned #784

Closed
@domhnal

Description

@domhnal

System Details

  • Operating system name and version: Windows 10 Pro v1607
  • VS Code version: 1.12.2
  • PowerShell extension version: 1.1.0
  • Output from $PSVersionTable:
    Name Value

PSVersion 5.1.14393.1066
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.1066
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Copy / paste the below commands into the PowerShell Integrated Terminal, and paste the output here
+ code -v
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\brucemacdonald> $pseditor.EditorServicesVersion


Major  Minor  Build  Revision
-----  -----  -----  --------
1      1      0      0


PS C:\Users\brucemacdonald> code --list-extensions --show-versions

code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ code --list-extensions --show-versions
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\brucemacdonald> $PSVersionTable


Name                           Value
----                           -----
PSVersion                      5.1.14393.1066
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1066
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
 

Issue Description

Domain enforced execution policy of AllSigned still causing problems. The PowerShell Editor Services module, specifically the ExtensionService, is writing PS script to files in the temp folder prior to execution, rather than executing it directly, to avoid creating a lot of noise in the logs (according to source comments). However, the execution of the files fails because they are not signed.

Attached Logs

1495713868-7e829c45-df99-45e5-8a0b-b66def66d6361495713858270.zip

Follow the instructions in the README
about capturing and sending logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions