[英]Updating Logon Hours on a user using C# System.DirectoryServices (windows 2008 Active Directory library)
这是工作日的小时访问表……我该怎么办?
Check out this thread on Directory Programming.NET - that's the best information I've found so far (and I've been looking for a while!). 在Directory Programming.NET上检查该线程-这是我到目前为止发现的最佳信息(并且我一直在寻找一段时间!)。
http://directoryprogramming.net/forums/thread/6194.aspx http://directoryprogramming.net/forums/thread/6194.aspx
There's also an article on CodeProject - LoginHours from DirectoryEntry as a boolean array - that shows to a certain degree how to work with logon hours from a DirectoryEntry
object. 在CodeProject上还有一篇文章-DirectoryEntry的LoginHours作为布尔数组 -在一定程度上显示了如何使用DirectoryEntry
对象的登录时间。
Here's another post which shows how to set the logon hours in Java - might be helpful, too, just to see how they do it. 这是另一篇文章 ,显示了如何在Java中设置登录时间-可能也很有帮助,只是看看它们是如何做到的。
This discussion has a tip regarding the time zone https://social.msdn.microsoft.com/Forums/vstudio/en-US/e745e812-1644-491f-9034-39855cd16016/how-to-get-users-login-hours-from-active-directory-using-c?forum=csharpgeneral that is also mentioned a bit at the useful link shared in the other answer http://www.codeproject.com/KB/system/DirectoryEntry_LoginHours.aspx 该讨论提供了有关时区的提示https://social.msdn.microsoft.com/Forums/vstudio/en-US/e745e812-1644-491f-9034-39855cd16016/how-to-get-users-login-hours -from-active-directory-using-c?forum = csharpgeneral ,在其他答案中共享的有用链接中也提到了一点http://www.codeproject.com/KB/system/DirectoryEntry_LoginHours.aspx
And here you can find more info on accessing this via Account Management API https://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.authenticableprincipal.permittedlogontimes(v=vs.110).aspx 在这里,您可以找到有关通过帐户管理API访问此内容的更多信息https://msdn.microsoft.com/zh-cn/library/system.directoryservices.accountmanagement.authenticableprincipal.permittedlogontimes(v=vs.110).aspx
some examples on using that API are at https://www.codeproject.com/Articles/90142/Everything-in-Active-Directory-via-C-NET-3-5-Using but haven't spotted one specific for manipulating the hours 有关使用该API的一些示例, 请参见https://www.codeproject.com/Articles/90142/Everything-in-Active-Directory-via-C-NET-3-5-Using,但尚未发现专门用于操作的API时间
If you use the classic API with LDAP-style attributes, you need to access "logonHours" one judging from https://msdn.microsoft.com/en-us/library/ms676846(v=vs.85).aspx and https://social.technet.microsoft.com/wiki/contents/articles/6822.active-directory-attributes-in-the-aduc-gui-tool.aspx 如果您将经典API与LDAP样式的属性一起使用,则需要访问https://msdn.microsoft.com/zh-cn/library/ms676846(v=vs.85).aspx和https中的 “ logonHours” ://social.technet.microsoft.com/wiki/contents/articles/6822.active-directory-attributes-in-the-aduc-gui-tool.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.