For talking with Exchange Online I need to enter credentials.
My favorite way to get them is this:
$LiveCred = Get-Credential
But in VS Code on windows opens to let me enter them.
Yep, Get-Credential support currently isn't implemented. I am still not sure how to do this in a secure way since it could involve sending a plaintext password from the editor to the language or debugging service. How high of a priority is this for you?
Sorry for the delay. For me it would be (it is actually) a showstopper. 99% of my daily work is related to Office 365 administration and management. Maybe this (cmdlet) needs to be realized as Windows-only feature. I don't see anyone developing or testing powershell script without sitting in front of a Windows gui.
I've been thinking about this a bit lately and it seems the best short-term solution will probably be to show a secure credential dialog from within the language service process (rather than VS Code) so that the credentials are handled securely. I will see if I can get a solution in place for this month's update.
Filed related issue on PowerShellEditorServices repo: https://github.com/PowerShell/PowerShellEditorServices/issues/114
@daviwil This is a bit of a roadblock for me. Any thoughts?
Still need to come up with an appropriately secure way to pass credentials from the editor to the language service. I'll talk to Lee about it.
I know it wouldn't be supported by "remote" execution but what could PSES popped up the cred UI? That would solve the security issue. WRT to remoting, how does that work with PSRemoting today? I assume the remote script winds up sending a request back to the local machine over WSMan?
As a workaround, I just tried using Read-Host, to no avail. Is this known, or should I file this one as new?
$Password = Read-Host -AsSecureString

@rkeithhill Good point, I guess I can just add some dirt-simple WPF dialogs that take input securely in the short term. Could also try to use the CredUIPromptForCredentials win32 API method, but that doesn't help for the Read-Host case.
@pcgeek86: The Read-Host issue is known, I was considering that a part of the Get-Credential work.
Any updates on this @daviwil? I keep running into it 😢
Nah, have been too busy on other stuff lately. The new integrated terminal support in VS Code should theoretically support it, though. Check out @gerane's blog post on the topic: http://brandonpadgett.com/powershell/Set-Default-VSCode-PS-64Bit/. Only downside to the integrated terminal support is that there's no connection between it and the editing experience.
If it is a specific command, you could set it up as a task runner for right
now. I think that would work at least.
On Jun 6, 2016 5:58 PM, "David Wilson" [email protected] wrote:
Nah, have been too busy on other stuff lately. The new integrated terminal
support in VS Code should theoretically support it, though. Check out
@gerane https://github.com/gerane's blog post on the topic:
http://brandonpadgett.com/powershell/Set-Default-VSCode-PS-64Bit/. Only
downside to the integrated terminal support is that there's no connection
between it and the editing experience.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/PowerShell/vscode-powershell/issues/57#issuecomment-224114245,
or mute the thread
https://github.com/notifications/unsubscribe/AGWoQM6TtfuKV2y5KYt0zNEZLkPsEtfmks5qJKYbgaJpZM4G7eSM
.
Is there progress being made on Get-Credential? Look forward to be able to use this when working in vscode! @daviwil
Get-Credential depends on the interactive console experience, will start working on that in earnest after the 0.9.0 release next week.
Don't want to bug you, but do you have a update to share with us David?
Edit: To answer my own question, it looks like David implemented it already, because in the insiders preview Get-Credential is working now. 👍
Not yet, sidetracked with other things over the last week. The plan is still to get a first pass of the interactive console shipped in 0.10.0 including Get-Credential support.
Still nothing on this @daviwil ?
The work is done now, finishing up some other things before release.
Release should happen tomorrow!
Great news!!
Most helpful comment
Get-Credential depends on the interactive console experience, will start working on that in earnest after the 0.9.0 release next week.