C#Active Directory和帐户已锁定 [英] C# Active Directory and Accounts Locked Out

查看:88
本文介绍了C#Active Directory和帐户已锁定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图查看一个帐户是否被锁定,但我无法弄清楚我做错了什么。如果有人有片刻下面是我正在尝试的。我知道我要找的值是1或0但是当我浏览当地人并找到  lockoutTime时,值
是  {System .__ ComObject}。任何建议都会有所帮助

I am trying to see if an account is locked out but I cant figure out what I am doing wrong. If anyone has a moment Below is what i am attempting. I know the value I am looking for is 1 or 0 but when I go through the locals and find lockoutTime the value is {System.__ComObject}. Any advice would help

long lockedOut;

lockedOut = (long)result.GetDirectoryEntry().Properties["lockoutTime"][0];

推荐答案

也尝试使用对象。没有更好的运气。

Tried using an object as well. no better luck.

object comObj;

comObj = result.GetDirectoryEntry().Properties["lockoutTime"][0];





这篇关于C#Active Directory和帐户已锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆