Hi there,
I am developing a desktop application that has a form that shows Domain on a System/ Network.The System.Environment.UserDomainName only tells the current user's domain. I want to see all the available domains and all the users under those doamain.
I want to know how can I read Domains in C#.
Regards,
Umair.P
0
Newbie Poster
Recommended Answers
Jump to PostI have used this in the past to query the domains. To get users, you will use the same concept of directory searcher, I think objectCategory=User. Make sure you have rights to query when using the directory searcher.
ArrayList domains = new ArrayList(); DirectoryEntry dirEntry = new …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.