**DONOTDELETE**
(Lurker)
2002-09-05 03:12 PM
NT Server List in DOS?

Does anyone know how to get a list of all NT Servers (DCs and Members) in a given domain in DOS?

The NETDOM command will either give you ONLY DCs, or every machine in the domain. I need JUST servers.


Radimus
(KiX Supporter)
2002-09-05 03:16 PM
Re: NT Server List in DOS?

WMI can do it..., but it will have to poll every PC on your network.

Beyond that, you would have to use ADSI


Sealeopard
(KiX Master)
2002-09-05 05:12 PM
Re: NT Server List in DOS?

And you'll have to use KiXtart 2.33 if you want to use your script under DOS, however, this will also exclude the use of WMI/ADSI.

NTDOCAdministrator
(KiX Master)
2002-09-05 07:36 PM
Re: NT Server List in DOS?

Okay hold on the Doc is here with a nice little perscription. Take 2 and call me when you're feeling better. [Big Grin]

Network View v1.20 (NetView.exe) Last Updated: 08/16/2001

Network View v1.20

Displays a list of all machines visible in the specified domain, based on role.
Basically a command-line view of Network Neighborhood, similar to 'Net.exe View'
but with the ability to filter on certain types of machines (workstations only,
servers only, time servers, SQL servers, etc.). Use 'NetView /?' to view the syntax.

NOTE: This list of machines is not real-time, but compiled and shared between
network segments at 12 minute intervals. New machines will not appear in the
browse list immediately, it may take up to 48 minutes, depending on the complexity
of your network. Likewise, machines removed from the network are not immediately
removed from the browse list, it may take up to 72 minutes. For more information,
see Microsoft Knowledge Base articles Q188001, Q102878 and Q150800.

The syntax of this command is:

NetView.exe [/NTW] [/NTS] [/PDC] [/BDC] [/PRINT] [/RAS] [/SQL] [/TIME] [/TS]
[/9x] [/HEX:0xXXXXXXXX] [/DOMAIN:domain] [/T] [/B] [/TABS]

Multiple switches can be specified, separate each with a space.

/NTW will include NT/2000/XP workstations.
/NTS will include NT/2000/.NET servers.
/PDC will include NT/2000/.NET primary domain controllers.
/BDC will include NT backup domain controllers.
/PRINT will include Print queue servers.
/RAS will include Remote Access Servers.
/SQL will include Microsoft SQL Servers.
/TIME will include all Time sources.
/TS will include all Terminal Servers.
/9x will include Windows 95/98/ME systems. (Only if sharing has been enabled.)
/HEX: allows you to specify your own bit mask. Use /HEX: /? for more details.

/DOMAIN: allows you to specify a different domain or workgroup.
/T also displays the primary machine type (Server, Workstation, PDC, etc.)
/B displays the output in bare format (useful when scripting)
/TABS separates columns with tabs instead of spaces (useful when importing)

An argument of /? or -? displays this syntax and always returns 1.
A successful completion will return 0.

Copyright 2000-2001 Marty List, OptimumX@usa.net

[ 05. September 2002, 19:39: Message edited by: NTDOC ]


Chris S.
(MM club member)
2002-09-05 08:45 PM
Re: NT Server List in DOS?

Thanks for that link, Doc. Using the hex switch (0x00010000) I was able to identify 200+ machines running the Master Browser service. No wonder the net admins were complaining. Looks like I have another scripting job on my plate. [Wink]