Powershell Form textbox

Is there a way to grab the value from a Textbox in Powershell without closing the form to get the value. For instance I start a form and want to enter information into a textbox but not have to close the form box to get the value. I'm trying to create textbox for entering password and username and the values are available to pass to PSCredentials. I have not been able to achieve this yet, so if you could assist me with a solution, workaround, or the best way to get the result I would appreciate it.
Who is Participating?
Daryl BamforthTechnical ExpertCommented:
Are you unable to just trigger '$usercred = get-credential'?

It may not be within the form you are creating, but should pop up a standard authentication box, which is then handled by windows, and passes back credentials in an encrypted format.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.