Friday, March 28, 2008 3:39 AM
What I want to do is shown in subject, but when I do a lot of search on google, that found out two ways can set or manage the specified accout: use windows net command and DirectoryEntry class, but the two ways just can manipulate account you specified, how can read all windows user accout first and then manage them?
if a short code that can read all windows user accout details(eg:group) is given it will be nice
Friday, March 28, 2008 3:50 AM
Using the DirectoryEntry class will let you get at all the users and manage them also. It all depends on what permissions the account that you use with the DirectoryEntry has. If you are in a doamin and the account that you use for the DirectoryEntry is a domain admin, they you can manage completely all the users within the domain.
Friday, March 28, 2008 5:11 AM
Hi Hohn hidey:
Thank you to replay my thread first. Well but could you give me some more details? which method can I get all user accout information.or give me a simple code, I'm a newer of C# . Thanks again.
Friday, March 28, 2008 6:21 AM
Here is a fantastic article that would help you in find various user credentials or information for a Windows User:
Hope this solves your problem completely
Friday, March 28, 2008 6:59 AMUsing the new System.DirectoryServices.AccountManagement library seems likes the easiest way to go.. (If you're lucky enough to have .Net 3.5)
Friday, March 28, 2008 7:10 AM
Hi Sandeep A:
Thanks very much for your article, however there is another question puzzled me: the article you commeded just solve the problem of how to get all groups in a system, but how can I get all user accout in each group? all I want are: all groups in a system(solved by the article), all accouts in each group, and accout related information(if it can be get).
That is definitly a good article which use Asynchronous Multi-Threaded technology. I learned a lot thanks again.
Friday, March 28, 2008 7:17 AM
The below mentioned articles will definitely help you solve your problem:
Friday, March 28, 2008 7:25 AM
I test some code in the article but the result is not what I want, God!
Friday, March 28, 2008 7:30 AM
unfortunately I am using .NET2.0+VS2005
Friday, March 28, 2008 8:33 AM
You are genius!! Thanks very very much