技術之路

數字創造未來

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

// Programming in C#

using System;
using System.DirectoryServices;
public class MyChangePasswordExample
{
public static void Main(string[] args)
{
  DirectoryEntry myDirectoryEntry;

  myDirectoryEntry = new DirectoryEntry (@"WinNT://yourdirectoryserver/TheUsername,User");

 myDirectoryEntry.Invoke("setPassword","NewPassword");

 myDirectoryEntry.CommitChanges();

}
}

posted on 2006-05-27 17:01  nathan  阅读(331)  评论(1)    收藏  举报