如何在首次登录时更改 ADS 密码

发布于 2024-09-03 17:45:12 字数 46 浏览 3 评论 0原文

我想在下次登录 ADS 容器时更改最初分配的密码。 如何以编程方式执行此操作?

I want to change the initially assigned password at the next login on a ADS container..
How to do this programmatically ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故人如初 2024-09-10 17:45:12

您可以使用 DirectoryEntry 更改 Active Directory 中的密码class:

DirectoryEntry directoryEntry = new DirectoryEntry(ADPath, ADUser, ADPassword, AuthenticationTypes.Secure);
directoryEntry.Invoke("ChangePassword", new object[]{strOldPassword, strNewPassword});

You can change a password in Active Directory using the DirectoryEntry class:

DirectoryEntry directoryEntry = new DirectoryEntry(ADPath, ADUser, ADPassword, AuthenticationTypes.Secure);
directoryEntry.Invoke("ChangePassword", new object[]{strOldPassword, strNewPassword});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文