When running Get-Credential, if I try to paste my password when prompted for a password, it only takes the first character or so then exits the command. The rest of the password is then pasted to the console.
PS C:> "TestPassword123" | clip.exe
PS C:> $cred = Get-Credential
PowerShell credential request
Enter your credentials.
User: Test
Password for user Test: *
PS C:> stPassword123
When pasting the password into the password prompt, the entire password should be accepted to properly create the credential object
As single character is pasted to the password field then the command closes and the remainder of the password gets pasted to the console.
PS C:> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0-preview.4
PSEdition Core
GitCommitId 6.1.0-preview.4
OS Microsoft Windows 10.0.15063
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
I'm also seeing this in the stable version as well.
PS C:\Program Files\PowerShell\6.0.3> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.3
PSEdition Core
GitCommitId v6.0.3
OS Microsoft Windows 10.0.15063
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Seems we already have such report.
I tried searching for it but wasn't able to find one. Do you have the issue #?
I can not find too.
Came to see if someone opened an issue for this, saw that @mmcelreath already did! I am seeing this as well. Environment information below.
Name Value
---- -----
PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Microsoft Windows 10.0.15063
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
@iSazonov / @vexx32 I don't think this is any issue anymore since I'm not able reproduce this on 7.1 rc1. Can this issue be closed?
C:\> "TestPassword123" | clip.exe
C:\> $cred = Get-Credential
PowerShell credential request
Enter your credentials.
User: test
Password for user test: ***************
C:\> $cred.GetNetworkCredential().Password
TestPassword123
Tested and confirmed this works as expected for me as well.
I set "Resolution-Answered" because we have no link to PR.
Most helpful comment
I set "Resolution-Answered" because we have no link to PR.