Query W2K for Member servers?

B

BT

Greetings. Is there a way I can query Windows 2000/2003 for a list of member
servers in my domain? I just inherited a mess of a domain with no
organization whatsoever. I know if you use NETDOM MASTER or NETDOM BDC you
can get a list of the DCs, but I'm wondering how to do that for the member
servers?

Thanks in advnace.
 
J

Jerold Schulman

Greetings. Is there a way I can query Windows 2000/2003 for a list of member
servers in my domain? I just inherited a mess of a domain with no
organization whatsoever. I know if you use NETDOM MASTER or NETDOM BDC you
can get a list of the DCs, but I'm wondering how to do that for the member
servers?

Thanks in advnace.
NETDOM QUERY had a SERVER option, but it doesn't seem to work.

From any W2K3 server in your domain, or from any Windows XP workstation, run the following script:

@echo off
setlocal
set dc="%TEMP%\Server_%RANDOM%.TMP"
dsquery server -o rdn>>%dc%
set qry=dsquery * domainroot -filter "(&(objectCategory=Computer)(objectClass=Computer))" -attr name operatingSystem -Limit 0
for /f "Tokens=1*" %%c in ('%qry%^|FIND /i " Server"^|findstr /i /v /g:%dc%') DO (
@echo %%c %%d
)
endlocal

See tip 7792 in the 'Tips & Tricks' at http://www.jsiinc.com and the link trail.


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
J

Jerold Schulman

Greetings. Is there a way I can query Windows 2000/2003 for a list of member
servers in my domain? I just inherited a mess of a domain with no
organization whatsoever. I know if you use NETDOM MASTER or NETDOM BDC you
can get a list of the DCs, but I'm wondering how to do that for the member
servers?

Thanks in advnace.
Oops.
See tip 8242 in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top