0
I want to validate a set of credentials against the domain controller. e.g.:
Username: STACKOVERFLOW\joel
Password: splotchy
Can I do this via the command line?
0
I want to validate a set of credentials against the domain controller. e.g.:
Username: STACKOVERFLOW\joel
Password: splotchy
Can I do this via the command line?
0
There's a very handy PowerShell function here for testing credentials:
Function Test-ADCredentials {
Param($username, $password, $domain)
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain
$pc = New-Object System.DirectoryServices.AccountManagement.PrincipalContext($ct, $domain)
New-Object PSObject -Property @{
UserName = $username;
IsValid = $pc.ValidateCredentials($username, $password).ToString()
}
}
Example use: Test-ADCrendentials -Username joel -Password splotchy -Domain stackoverflow.com
0
I tend to just connect to a share on the server:
net use \server\share * /user:domain\username
You're then prompted for a password and if the correct one is entered you now have a connection to the server and a response that the command completed successfully.
Is the computer you are doing the testing on already a member of the domain? – Scott Chamberlain – 2013-05-20T17:30:11.903