0
var data = new DirectoryEntry("LDAP://xxx.xxx", LdapAdUserName, LdapAdPassword);
data.data.Properties["LockoutThreshold"].Value = 10;`
data.data.Properties["maxPwdAge"].Value = 90;
data.CommitChanges();

AD でドメイン パスワード ポリシーを変更しようとしています。最初に、「LockoutThreshold」を更新しようとします => OK 次に、「maxPwdAge」を更新しようとします => コミット時に例外が発生します

例外:

An exception of type 'System.DirectoryServices.DirectoryServicesCOMException' occurred in System.DirectoryServices.dll but was not handled in user code

「maxPwdAge」を設定できないのはなぜですか??

4

1 に答える 1

0

私が理解しているように、あなたはドメイン管理者である必要があります.C ++を使用してActiveDirectoryでmaxpwdAge属性値を取得する方法は? 、これはC++ですが、原則は同じです。

于 2015-06-16T07:41:28.770 に答える