Test-ADCredential
SYNOPSIS
Validates Active Directory credentials.
SYNTAX
DESCRIPTION
The `Test-ADCredential` function validates the provided Active Directory credentials by attempting to authenticate against the domain. It uses the `System.DirectoryServices.AccountManagement` namespace to perform the validation and supports credentials with or without a specified domain.
EXAMPLES
EXAMPLE 1
Validates the provided credentials against the Active Directory domain.
EXAMPLE 2
Stores the credentials in a variable and validates them against the Active Directory domain.
PARAMETERS
-Credential
The credential to validate. If no domain is specified, the current user's domain is used.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False