Share via


ComputerPrincipal.FindByBadPasswordAttempt 方法

定义

返回 PrincipalSearchResult<T> 对象的 ComputerPrincipal 集合,这些对象在指定的参数内具有错误的密码尝试。

public:
 static System::DirectoryServices::AccountManagement::PrincipalSearchResult<System::DirectoryServices::AccountManagement::ComputerPrincipal ^> ^ FindByBadPasswordAttempt(System::DirectoryServices::AccountManagement::PrincipalContext ^ context, DateTime time, System::DirectoryServices::AccountManagement::MatchType type);
public static System.DirectoryServices.AccountManagement.PrincipalSearchResult<System.DirectoryServices.AccountManagement.ComputerPrincipal> 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.ComputerPrincipal>
Public Shared Function FindByBadPasswordAttempt (context As PrincipalContext, time As DateTime, type As MatchType) As PrincipalSearchResult(Of ComputerPrincipal)

参数

context
PrincipalContext

PrincipalContext,用于指定要对其执行操作的服务器或域。

time
DateTime

一个 DateTime 结构,与 MatchType 一起用于查找具有错误密码尝试的计算机。

type
MatchType

一个 MatchType,用于指定要在搜索中使用的比较类型。

返回

一个 PrincipalSearchResult<T>,其中包含一个或多个匹配搜索参数的 ComputerPrincipal 对象,如果未找到匹配项,则为一个空集合。

注解

时间默认为 UTC。 如果要以本地时间指定时间,请将 对象的 属性time指定KindLocal

适用于