Skip to content

Unable to run scripts with integrated PowerShell Console in VSCode 1.47.1 #2808

@jlapchuk

Description

@jlapchuk

Since upgrading to v1.47.1 of VSCode, I can't run PS scripts using the built in console. Hitting F5 does nothing, and attempting to run a line of code using F8 gives an error: "command 'PowerShell.RunSelection' not found"

I also notice that the version of PS is not displayed in the bottom-right.

image

I suspect this has to do with the latest CVE patch.
https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-1416

My question is, am I doing it wrong? Or is this a bug that needs to be corrected? In my scenario, I have a regular (non-admin) account I use to login to my workstation. Depending on the PowerShell task/script, I may need to run VSCode as my secondary (admin) account (with elevated rights). To do that, I'll first run powershell.exe 'As Different User', authenticate with my secondary admin account, then run VSCode as admin (Start-Process code.exe -Verb RunAs) to get into an elevated session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions