Re: Enumerate Windows NT4 *Servers*



Ops sorry havent been checking my mail for a bit

Yes if you check active Directory's name for the Operating System
Windows NT Workstation and Windows NT Server are both noted in Active
Directory as Windows NT

Cant seem to find a way to differentiate them

I'll check out netdom thanks - will see if that can do it and pipe the
output to my .NET app

Thanks,


Dave



Richard Mueller wrote:

The only method I know of is to search for all computer objects with the
string "server" in the operatingSystem attribute. Torgeir Bakken posted this
snippet that also excludes domain controllers from the search results:

http://groups.google.com/group/microsoft.public.windows.server.active_directory/browse_frm/thread/ec675b7c585ff686/2b4f77586c65da4b?lnk=st&q=&rnum=3&hl=en#2b4f77586c65da4b

You could remove the filter clause that excludes DC's if desired. Or, you
could use Netdom to query for servers.
Are you saying the value of operatingSystem is the same for member servers
and workstations?

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net

<davidhomer@xxxxxxxxxx> wrote in message
news:1168436985.283554.298170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hey Richard! I think I've used your Scripts before - remember the name
:)

Can't use the nTDSDSA object I'm afraid - as I'm looking for NT4
*MEMBER* Servers - already got the Domain Controllers sorted (probably
using snippets of your code actually)

Any ideas about NT4 Member Servers?


Dave




Richard Mueller wrote:

Dave wrote:


I have a VB.NET application that is required to find Windows NT4
Servers on a network. It currently does this by using the Browse List.
This isn't exactly ideal.

I can find NT BDCs by doing an AD query however NT4 Member Servers
report the OS as the same as NT4 Workstations. I've checked the Account
Control attribute too but this is the same.

Any ideas how I can find these member servers without finding
workstations either. Also I don't want to connect to each and every NT4
box to do this.

I am sure there is a way as Windows NT Server manager can do
it...........

If you have Active Directory, domain controllers have objects in the
Configuration container with child objects of class nTDSDSA. The domain
controller objects are in a cn=Servers container in the appropriate Site
container. You can see this using ADSI Edit. The method I use is to use
ADO
to find all objects of class nTDSDSA and then the parent object of each
is
the domain controller. I have an example VBScript that retrieves the
names
of all domain controllers in a domain linked here:

http://www.rlmueller.net/Enumerate%20DCs.htm

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net


.



Relevant Pages