This script will check if the password for a given username is correct.
If the authentication failed using the provided Domain\Username and Password, The script will do some checks and provide clues why the authentication failed.
The checks are:
- Domain is reachable.
- User Name exists in the domain.
- The account is Enabled.
- The account is Unlocked.
You can run the script from powershell as .\Test-UserCredentials.ps1 or Right click the script and select “Run with PowerShell”,
The script will ask for the user credentials as Domain\Username, and Password in a friendly Windows authentication window, and report the status of the combination.
Screenshots:
Get User Input:
Example for correct username and password
Example for failed authentication due to: domain is not found/unreachable:
Example for failed authentication due to: User Name does not exist:
Example for failed authentication due to: User Account is disabled:
Example for failed authentication due to Locked out User account:
Example for failed authentication mostly due to wrong password:
Download from TechNet Gallery: https://gallery.technet.microsoft.com/PowerShell-Test-Domain-b71cc520