1

我想设置 DirectoryEntry 对象的 MaxPasswordAge 属性。我相信它是 IADSLargeInteger 类型。现在我想以编程方式将其设置为某个值。如何将时间跨度转换为 IADSLargeInteger。例如。如果我想将其设置为 10 天,我该怎么做。直接设置是不行的。

DirectoryEntry child = new DirectoryEntry("LDAP://" + domain);
child.Properties["minPwdAge"].Value = ... 

我如何将该值设置为 n 天?任何帮助表示赞赏。

4

1 回答 1

0

我不相信你真的可以写信给这个属性。在任何情况下,您都希望以 FileTime 格式获取它,DateTime 对象会将其作为属性提供给您。

于 2012-05-02T17:14:25.227 回答