vscode-powershell
vscode-powershell copied to clipboard
Integrated Powershell Hangs on Get-Credential
System Details
### VSCode version: 1.33.0 0dd516dd412d42323fc3464531b1c715d51c4c1a x64
### VSCode extensions:
[email protected]
[email protected]
[email protected]
### PSES version: 1.12.0.0
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
System Details Output
Issue Description
I am experiencing a problem when I am running my script, everytime I do a Get-Credential to login to Office365, it will hang on me. Now I want to say this was working before but for some reason it is not working now. I can copy parts of my script and put it in a new file and run it, and it will work. I have even tried just copying the text to a new file and saving it as something different, but still the issue persists.
Expected Behaviour
-- In Powershell ISE, it will ask me for credentials in a Credentiaol GUI window, In VSCode it will only ask for them in the terminal, but both are successful and work, well VSCode is successful when its not in my entire script.
Actual Behaviour
-- In VSCode it asks me for my password in the terminal, but wont let me type it in and just hangs.
Attached Logs
EditorServices.log Start-EditorServices-EditorServices.log vscode-powershell.log
I can confirm this happens on latest insiders vscode with Preview extension. I have no reason why, Fluent Terminal and conemu with credential's captured in terminal don't have this issue. Ditto for Integrated Terminal provided by vscode.
PSIC seems to be the cause, but that's about as far as I've been able to determine.
Ninja Edit to add:
@ErvM if you click the trash icon above the console, it will kill the session and prompt you to restart. You can also click the 5.1
in the status bar and opt to restart current session.
I have even taken out a part of my script that calls the function that does the Get-Credential and starts a PSSession, and that works 100%, I have tried so many things to see what could be causing it, its driving me mad!
--Reply to the Ninja Edit! I cant believe I didn't see that trashcan, that indeed kills it! Thanks for that!
@ErvM sorry that you are hitting this, thanks for reporting the issue! We will try to investigate the cause.
I confirm i have the same problem. Windows 7 Pro x64 Powershell 5.1 Visual Studio Code 1.36.0 PowerShell Language Support for Visual Studio Code 2019.5.0
I add Get-Credential into AddClick Button.
@SydneyhSmith any update? also ran into this problem
I'm having this issue even in powershell terminal. running Get-Credential
gives me the dialog window, but after that powershell freezes. I can't even force close the process (access denied)
This continues to be a problem.
VSCode: 1.63.2 Powershell Extension: v2021.12.0
Have you tried the preview extension? Works fine there for me on both 7.2 and 5.1
I'm going to assume this is fixed as we haven't heard back from you, thank you!
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.