简体   繁体   English

使用C#System.DirectoryServices更新用户的登录时间(Windows 2008 Active Directory库)

[英]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).aspxhttps中的 “ 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.

相关问题 Active Directory LDAP 连接使用 System.DirectoryServices - 服务器无法运行 - Active Directory LDAP connection using System.DirectoryServices - The server is not operational C# 使用 System.DirectoryServices.Protocols 针对 MS Active Directory 服务器验证用户 - C# Validate User against the MS Active Directory Server using System.DirectoryServices.Protocols 通过 System.DirectoryServices C# 更改 OU 的描述 - Change description of an OU via System.DirectoryServices C# System.DirectoryServices ArgumentNull异常中的目录同步 - Directory Synchronization in System.DirectoryServices ArgumentNull Exception C#Active Directory-迁移到System.DirectoryServices.AccountManagement - C# Active Directory - Migrate to System.DirectoryServices.AccountManagement Active Directory:System.DirectoryServices命名空间。 得到“传递了无效的目录路径名” - Active Directory: System.DirectoryServices namespace. Getting “An invalid directory pathname was passed” Active Directory使用System.DirectoryServices.AccountManagement在c#中搜索与特定名称匹配的所有组和用户。 - Active directory search for all groups and users matching a particular name in c# using System.DirectoryServices.AccountManagement? 使用C#登录到Active Directory - Using C# to logon to Active Directory 通过System.DirectoryServices将StartTLS与LDAP一起使用 - Using StartTLS with LDAP from System.DirectoryServices System.DirectoryServices很慢? - System.DirectoryServices is slow?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM