G
Guest
I'm writing a program which needs to determine whether the local machine is a
domain contoller or not. The steps I plan to do is:
1. Find out the local machine's name and domain name it belongs to.
2. Use System.DirectoryService to check whether the local machine is the
domain controller.
Question 1:
Is this the right way to do it? In other words, Is there a better/easier
way to do it?
Question 2:
How do I get the local machine's name and domain name? I can not use
System.Environment.UserDomainName to get the domain name because user may use
local account to login.
Thanks a lot,
Gniluy
domain contoller or not. The steps I plan to do is:
1. Find out the local machine's name and domain name it belongs to.
2. Use System.DirectoryService to check whether the local machine is the
domain controller.
Question 1:
Is this the right way to do it? In other words, Is there a better/easier
way to do it?
Question 2:
How do I get the local machine's name and domain name? I can not use
System.Environment.UserDomainName to get the domain name because user may use
local account to login.
Thanks a lot,
Gniluy