Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Posts: 57
- Joined: Mon Apr 25, 2016 1:08 am
- Location: United Kingdom
I have a GUI which requires the user to enter their AD Credentials for certain tasks to run.
I want to be able to validate the users credentials and return an error if the password is incorrect. What is the best method for this?
I am using Get-Credential
Code: Select all
$Cred = Get-Credential -UserName $env:USERNAME.ToLower() -Message "Authentication"
- Posts: 13682
- Joined: Tue May 22, 2007 9:57 am
The only way to validate credentials is to try and use them.