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

08/21/2005 3:10 AM  
You could use some interesting threading ideas. Say pass
off machines to be enumerated to one control thread, it spawns up threads (up to
x threads which is configurable) to ping, the control thread watches how long
each thread runs for, if it exceeds yy ms then you terminate the thread or let
it time itself out but in the meanwhile you know the machine isn't out there,
the ones that return quick would be positives. You will need very little stack
for these threads that you fire up (very little any resources) so tune that down
and you could tune the number of threads up. If ~Eric catches this thread he may
beat on my idea or add to it. Of course that assumes written code and not
scripts.

I am not sure there is any good answer for a script here.
To positively get good info, a script would be too underpowered unless it is say
a perl script which would allow some of the good programmatic things you could
do.


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

Hi Michael,

Thanks for the response, But it isn't quite what I
want. The code you give gives the NetBios name of the
logged on user. I am trying to find the NetBios name
for another domain.

I have tried enumerating all machines on the domain
and then pinging them, but it takes too long. We have 20,000 machines, of which
10,000 are offline. Each ping to an offline machine takes 1 sec to time out, so
it takes over 3 hours! I was looking a for a quicker way....

Alan C

----- Original Message -----
From:
Michael B.
Smith
To: ActiveDir@xxxxxxxxxxxxxxxxxx

Sent: Sunday, August 21, 2005 8:47
PM
Subject: RE: [ActiveDir] Getting the Pre
Windows 2000 name for a domain

As to the first question:

Dim objWSHNetwork

Set
objWSHNetwork = CreateObject ("WScript.Network")' get the
NetBIOS domain namestrNetBIOSDomain =
objWSHNetwork.UserDomainSet objWSHNetwork =
Nothing

As
to the second question, see

http://www.microsoft.com/technet/scriptcenter/scripts/ad/computer/cptrvb07.mspx

and

http://msdn.microsoft.com/library/default.asp?url="">


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:bebo
New TodayNew Today:0
New YesterdayNew Yesterday:0
User CountOverall:4205

People OnlinePeople Online:
VisitorsVisitors:121
MembersMembers:1
TotalTotal:122

Online NowOnline Now:

Ads

Copyright 2008 ActiveDir.org
Terms Of Use