wntServerList and WntServiceAt Help File Correction
Keywords: wntServerList WntServiceAt Help File
Question:
What I want to be able to do, is to list all servers in a specified domain, and their role (i.e. PDC,BDC etc). I'm assuming that you don't know what servers you currently have in your domain, so I don't want to inpt any server names, The "wntServerList" function should allow me to do this, but the results are inaccurate.Answer:
Apparently there was a problem with the help file for wntServiceAt and wntServerList, whereby a line got wrapped, and all the flags were shifted incorrectly.The correct flags are listed below:
1 All LAN Manager workstation 2 All LAN Manager server 4 Any server running with Microsoft SQL Server 8 Primary domain controller 16 Backup domain controller 32 Server running the timesource service 64 Apple File Protocol servers 128 Novell servers 256 LAN Manager 2.x Domain Member 512 Server sharing print queue 1024 Server running dialin service 2048 Xenix server 4096 Windows NT (either workstation or server) 8192 Server running Windows for Workgroups 16384 Microsoft File and Print for Netware 32768 Windows NT Non-DC server 65536 Server that can run the browser service 131072 Server running a browser service as backup 262144 Server running the master browser service 524288 Server running the domain master browser 4194304 Windows 95 or newer -2147483648 Domain announcement
Question:
We've got 20 BDC's in our organization, 5 are local and the other 15 are on the WAN, which is always connected (frame relay, not some dial-on-access ISDN or anything). When I do awntServerList("\\mspdc01","mortenson",8|16)orwntServerList("\\mspdc01","mortenson",24)(which I assume are logically the same), I only see three of the BDCs. Is there a reason I don't see any on the WAN and only 3 of 5 locally? They are all NT4 BDCs that don't get shown. Thanks!Answer:
Not currently sure, but I think it just dumps the information from the Master browser service. If that does not show the computers, then wntServerList will not either.Also WANs usually have a router that limits what network packets can go across it, and it may be screening out the normal network chatter where these sorts of things are communicated between computers.
Question:
I'm using:wntServerList("","",2)and I've also tried:wntServerList("","",1)and also have plugged in a server name for the 1st parameter.In all cases, the function returns ALL servers AND workstations on the network. NOT just servers OR workstations as one would expect, using the 1 or 2.
If I specify 8|16, it works great for returning the BDC/PDC.
We're running NT4.0, SP5, and WB2000C.
Any idea what the problem could be?
Answer:
All servers have the 1 and 2 bits set, in addition to any other bits. Ie, a PDC is 1 | 2 | 8. If he wants to filter some out, he can use wntServerInfo(3) for each server in the list and exclude and that aren't type 1 and/or 2.These days most machines are running both as workstations and servers. If you can connect to a machine and see files, then it is running as a server. It has nothing to do with if you have Windows Server installed or anything.
There is a way to peek at the registry and see what version of NT is installed.
Article ID: W13578Filename: wntServerList and wntServiceAt.txt