terminal: Get-Credentials fails to open a prompt for password on 1.15.2713 (Windows 11)

Windows Terminal version

1.15.2713.0

Windows build number

10.0.22621.0

Other Software

No response

Steps to reproduce

Open Terminal and type Get-Credential

Expected Behavior

Prompt for password to enter

Actual Behavior

Throws an error message:

image

Get-Credential : Cannot process command because of one or more missing mandatory parameters: Credential.
At line:1 char:1
+ Microsoft.PowerShell.Security\Get-Credential
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-Credential], ParameterBindingException
    + FullyQualifiedErrorId : MissingMandatoryParameter,Microsoft.PowerShell.Commands.GetCredentialCommand

Works fine when using 1.16.2642.0 or using PowerShell 7. The difference being is that PowerShell 7 doesn’t open outside window, and PowerShell 5.1 triggers an external window which is why there may be an issue.

Here’s how it looks when working (in 1.16.2642.0)

image image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 18 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Same here with 1.15.2713.0 in Windows 11 Pro.

If you open Out-GridView first then Get-Credential it works

image

See https://github.com/microsoft/terminal/issues/11847#issuecomment-1402554766 for a workaround that gets PowerShell to prompt for the credential using the command line rather than through a credui window.

Looping back on this:

This is something we actually can’t fix on our side. It would require a dotnet foundation fix, which won’t happen, because that’s not really maintained anymore (in favor of dotnet core).

Since this is kinda at an impasse blocked on this old version of dotnet, we’re going to close this out on our side. Thanks everyone

See #11847 (comment) for a workaround that gets PowerShell to prompt for the credential using the command line rather than through a credui window.

Or just run Out-GridView once. After that Get-Credential works even after rebooting and cold start.

Thanks, only don’t understand what kind of sorcery this is! 😄