-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Get-Credential Ability to Override Username #12222
Copy link
Copy link
Closed
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Securitysecurity related areas such as JEAsecurity related areas such as JEA
Metadata
Metadata
Assignees
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Securitysecurity related areas such as JEAsecurity related areas such as JEA
Summary of the new feature/enhancement
Back in Powershell 5, I could write a script which contained:
A dialog would then appear, asking for the password, but it also gave the option of changing what the username was. This was useful as you could implement a naming standard, but when there was an edge case allowed the end user to be able to easily override it.
This workflow could be built into many scripts wanting to upgrade from Windows Powershell to Powershell 7.
Proposed technical implementation details (optional)
Reading #10625 I thought a
-ConfirmUserNameswitch would be consistent, but a-DefaultUserName Usernamestring would work just as well.The below is how I saw it being used, being consistent with other command line tools
The User can just press enter without typing anything and it will use the default value.
It would be nice if the value was presented as pre-typed - as this would allow the user to manipulate the value instead of either choose the default, or write it again from scratch.