Tests a credential or user name to verify that it authenticates in the domain.
Description
The Test-SCDomainCredential cmdlet tests a credential object or user name to verify that it authenticates in the domain.
Parameters
Credential
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
0
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.
For more information about the PSCredential object, type: "Get-Help Get-Credential".
For more information about Run As accounts, type: "Get-Help New-SCRunAsAccount".
VMMServer
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies a VMM server object.
UserName
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
0
Specifies a the name of a user. Enter a user name with the format Domain\User.
The first command prompts you for a username and password, creates a PSCredential object, and stores the object in the $Creds variable.
The second command validates the credential object in $Creds and returns either True or False.