Active Directory和上次登录 [英] Active Directory and last logon

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

问题描述

这已经解决了。不确定如何关闭此线程


 if(result.GetDirectoryEntry()。Properties [" lastLogon"] == null)
{
Console.WriteLine(" Lastg Log On:用户帐户从未登录过)");
}
else
{
logonStr = result.GetDirectoryEntry()。Properties [" lastLogon"]。Value.ToString();
Console.WriteLine(" Last Logon:" + logonStr);

}

解决方案

以下链接中的代码应该有帮助


https://social.msdn.microsoft.com/论坛/ vstudio / EN-US / 00563f05-ad0e-481D-93分贝-df1d72c593fc /取,最后登录-细节 - 从主动目录 - 使用 - CNET?论坛= csharpgeneral


This has been resolved. Not sure how to close this Thread

                if (result.GetDirectoryEntry().Properties["lastLogon"] == null)
                {
                    Console.WriteLine("Lastg Log On: User account never logged in");
                }
                else
                {
                    logonStr = result.GetDirectoryEntry().Properties["lastLogon"].Value.ToString();
                    Console.WriteLine("Last Logon: " + logonStr);
                    
                }

解决方案

Code in following link should help

https://social.msdn.microsoft.com/Forums/vstudio/en-US/00563f05-ad0e-481d-93db-df1d72c593fc/fetch-last-logon-details-from-active-directory-using-cnet?forum=csharpgeneral


这篇关于Active Directory和上次登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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