UserPrincipal.FindByBadPasswordAttempt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a collection of PrincipalSearchResult<T> objects for users that have an incorrect password attempt recorded in the specified date and time range.
public:
static System::DirectoryServices::AccountManagement::PrincipalSearchResult<System::DirectoryServices::AccountManagement::UserPrincipal ^> ^ FindByBadPasswordAttempt(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, DateTime time, System::DirectoryServices::AccountManagement::MatchType type);
public static System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.UserPrincipal> FindByBadPasswordAttempt (System.DirectoryServices.AccountManagement.PrincipalContext context, DateTime time, System.DirectoryServices.AccountManagement.MatchType type);
static member FindByBadPasswordAttempt : System.DirectoryServices.AccountManagement.PrincipalContext * DateTime * System.DirectoryServices.AccountManagement.MatchType -> System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.UserPrincipal>
Public Shared Function FindByBadPasswordAttempt (context As PrincipalContext, time As DateTime, type As MatchType) As PrincipalSearchResult(Of UserPrincipal)
Parameters
- context
- PrincipalContext
The PrincipalContext object that specifies the server or domain against which operations are performed.
- time
- DateTime
A DateTime object that identifies the date and time of the incorrect password try. This parameter is used with the type parameter to determine the range of time in which the returned objects have an incorrect logon try recorded.
- type
- MatchType
A MatchType enumeration value that specifies the type of match that is applied to the time
parameter.
Returns
A PrincipalSearchResult<T> that contains one or more UserPrincipal objects, or an empty collection if no results are found.
Remarks
The time will default to UTC. If you want to specify the time in local time, then specify the Kind property of the time
object as DateTimeKind.Local.