Where does NetServerEnum() get its list of machines from?
Does it use the computer browser service or will it use AD as a preference if AD is available?
Links:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From the Browser service. NetServerEnum pre-dates Active Directory, and has to run on non-AD systems. NetServerEnum will return 6118 (no browsers) if it can’t find a browse server. I think AD has the ADSI interface for this kind of task, but I never programmed against AD.
Note that NetServerEnum can be unconscionably slow on a large domain: I found this out the hard way by trying to use NSE for a rudimentary ‘discovery’ algorithm. Soon learned my lesson and swapped to UDP for that task.