Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

List Archives

Subject: RE: [ActiveDir] Getting the Pre Windows 2000 name for a domain
Prev Next
You are not authorized to post a reply.

AuthorMessages
listmailUser is Offline

Posts:326

08/21/2005 3:03 AM  
You can get all of the pre-2K names of all domains in a
forest by looking at the nETBIOSName attribute of the crossref objects in the
partitions container of the configuration container. You want anything with
systemflags&2.

You do not want to pick off the name attribute of the
domaindns object because if you have a disjoint namespace going on (DNS name
does not match NetBIOS name) then you will not get it right.

As for Net View, I believe that uses NetServerEnum which
enumerates the machines with server service registered, I think, with the
browser service. The browser service being a poor mechanism for finding really
anything in a larger environment with multiple subnets especially if you have
any multihomed machines or filtering rules. Also anyone that shuts down server
on their machine (or it otherwise failed to start) wouldn't show up.



From: ActiveDir-owner@xxxxxxxxxxxxxxxxxx
[mailto:ActiveDir-owner@xxxxxxxxxxxxxxxxxx] On Behalf Of SysPro
SupportSent: Sunday, August 21, 2005 1:54 AMTo:
ActiveDir@xxxxxxxxxxxxxxxxxxSubject: [ActiveDir] Getting the Pre
Windows 2000 name for a domain

Hi,

I have a requirement to determine the machines
that are currently online for a particular domain. I use the Net View 
command and give it a domain name such as:

Net View /Domain:DomName

Since  I know the Fully qualified Domain
name AAA.BBB.CCC then I use:-

Net View /Domain:AAA

and it normally works. However I have one client
that uses a different Pre Windows 2000 name (don't ask me why). I tried the
following bit of code to try and programmatically work out the Pre Windows 2000
name:-

    Dim Sdou As
IADs    Dim PropertyValue As
Variant        Set Sdou =
GetObject("LDAP://DC=AAA,DC=BBB,DC=CCC")   
For Each PropertyValue In
Sdou.GetEx("Name")        If
PropertyValue ""
Then           
MsgBox PropertyValue        End
If    Next
but it just returned AAA.

So, is there a property in Active Directory that
returns the Pre Windows 2000 name?

Alternatively, is there anyway to determine the
machines that are online via AD, rather than via the Net View
command?

Alan Cuthbertson
You are not authorized to post a reply.
Forums >ActiveDir Mail List Archive >List Archives > RE: [ActiveDir] Getting the Pre Windows 2000 name for a domain



ActiveForums 3.7
AdventNet Banner
Friends

Friends

Namescape
Members

Members

MembershipMembership:
Latest New UserLatest:arabic58
New TodayNew Today:0
New YesterdayNew Yesterday:1
User CountOverall:4213

People OnlinePeople Online:
VisitorsVisitors:72
MembersMembers:0
TotalTotal:72

Online NowOnline Now:

Ads

Copyright 2008 ActiveDir.org
Terms Of Use