Open opmdsm opened 1 month ago
This is how terminal looks like
Been having the same issue for the past week or so. Seems to only happen when switching the session to PS 5.1. My workaround is to switch the shell by running powershell
in my pwsh
session, instead of using the PowerShell: Show Session Menu -> Switch to:
command.
Thanks for the submission! The most common reason we've been seeing this lately is an antivirus program blocking or halting the execution of the PowerShell extension. Do you have any antivirus programs installed?
Otherwise there's not much we can do without a reproducible method, I just tried it in a fresh Windows Server and Windows 11 VM and both worked fine, can you install PowerShell 7? PowerShell 5.1 is as-is support, PowerShell 7 will work better even if you are only authoring 5.1 scripts.
So I've actually seen multiple reports on this so there might be something, but on my Win11 machine and in a clean environment, WinPS 32, WinPS64, and PS7.4 all load just fine with 1.94 vscode.
@andyleejordan FYI in case you have an idea.
Report from jcotton42 on discord
I wonder, is it related to the shell integration path moving? They released that changer sooner than I expected so we're temporarily broken. Working on getting a release out ASAP.
Been having the same issue for the past week or so. Seems to only happen when switching the session to PS 5.1. My workaround is to switch the shell by running
powershell
in mypwsh
session, instead of using thePowerShell: Show Session Menu -> Switch to:
command.
I will try it, thanks.
Thanks for the submission! The most common reason we've been seeing this lately is an antivirus program blocking or halting the execution of the PowerShell extension. Do you have any antivirus programs installed?
Otherwise there's not much we can do without a reproducible method, I just tried it in a fresh Windows Server and Windows 11 VM and both worked fine, can you install PowerShell 7? PowerShell 5.1 is as-is support, PowerShell 7 will work better even if you are only authoring 5.1 scripts.
I have the built in MS Defender, that's all. I tried on other machines and it's working, it's something particular on my machine.
Hi,
Anyone knows how can I trigger again that popup/dialog with adding a trust publisher when installing an extension? I mean the very first time when you install a extension from a publisher and you are asked if you trust that publisher. I'm trying to untrust and trust again that publisher maybe it works. For that I uninstalled Visual Studio Code and then removed .vscode folder from user's folder and also Code folder from C:\Users\
Thanks, Marius.
This is the trust publisher question which never ends when I press A: "Do you want to run software from this untrusted publisher? File C:\Users\MyUserName.vscode\extensions\ms-vscode.powershell-2022.11.0\modules\PowerShellEditorServices\Commands\PowerShellEditorServices.Commands.types. ps1xml is published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US and is not trusted on your system. Only run scripts from trusted publishers. [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help (default is "D"):"
Hi, I solved the same issue by run this powershell command: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
this will allow to run powershell scripts with the curret user (both on Powershell ISE and Visual Studio Code)
Prerequisites
Summary
Hi,
This is the second time when I face this situation. Scenario: Fresh install of Visual Studio Code (VSC), then install PowerShell extension from Microsoft. Upon requesting to trust publisher, I press A (always trust) in the terminal window and then nothing happens. I leave it for 1-2h without nothing to happen and then force to stop it. Restarting VSC and Windows PowerShell (x64) is never loading, the bottom-right icon is spinning forever. Switching to Windows PowerShell (x86) is working. The first time when this happened was 2-3 years ago and I remember I've spent also lot of time trying to figure out how to fix this. I discovered the fix by mistake: Found a post about OneDrive somehow corrupting some PowerShell (psm/psd) files from Documents folder or someting. Running chkdsk from command propmt fixed the issue. But now this doesn't seems to have any effect. Any ideas what can I do?
Thanks, Marius.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
See Summary section
Visuals
No response
Logs
No response