Last active
April 20, 2017 18:35
-
-
Save tschoonover/708b5540d70d3d8d2462e46af44dbb17 to your computer and use it in GitHub Desktop.
Check password with PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Test-ADAuthentication { | |
param($username,$password) | |
(new-object directoryservices.directoryentry "",$username,$password).psbase.name -ne $null | |
} | |
Test-ADAuthentication "DOMAIN\username" "password" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment