AdvancedFilters.BadLogonCount(Int32, MatchType) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Özniteliğin sorgu filtresini BadLogonCount belirtilen değere ve karşılaştırma türüne ayarlar.
public:
void BadLogonCount(int badLogonCount, System::DirectoryServices::AccountManagement::MatchType match);
public void BadLogonCount (int badLogonCount, System.DirectoryServices.AccountManagement.MatchType match);
member this.BadLogonCount : int * System.DirectoryServices.AccountManagement.MatchType -> unit
Public Sub BadLogonCount (badLogonCount As Integer, match As MatchType)
Parametreler
- badLogonCount
- Int32
Bir tamsayı.
- match
- MatchType
MatchType Özniteliğin değeriyle nasıl badLogonCount
karşılaştırılması gerektiğini belirten bir.
Örnekler
// Create the principal context for the usr object.
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
// Create the principal user object from the context
UserPrincipal usr = new UserPrincipal(ctx);
// Set the advanced query filter
int badLogonThreshold = 3;
usr.AdvancedSearchFilter.BadLogonCount(badLogonThreshold, MatchType.GreaterThan);
// Create a PrincipalSearcher object.
PrincipalSearcher ps = new PrincipalSearcher(usr);
PrincipalSearchResult<Principal> results = ps.FindAll();
Console.WriteLine("The following users have logged on unsuccessfully at more than " + badLogonThreshold.toString + " times:");
foreach (UserPrincipal u in results)
{
Console.WriteLine(u.Name);
}
Şunlara uygulanır
Ayrıca bkz.
GitHub'da bizimle işbirliği yapın
Bu içeriğin kaynağı GitHub'da bulunabilir; burada ayrıca sorunları ve çekme isteklerini oluşturup gözden geçirebilirsiniz. Daha fazla bilgi için katkıda bulunan kılavuzumuzu inceleyin.