这是工作日的小时访问表……我该怎么办?
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!).
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.
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.
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
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
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
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.