共用方式為


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

適用於