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:
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:
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.