Archived from groups: microsoft.public.win2000.active_directory (
More info?)
"Ricardo" <Ricardo@discussions.microsoft.com> wrote in message
news:9EA34A93-18C6-4999-863B-4544A0AB16D8@microsoft.com...
> OK, but I'd like to know if there's a command line that shows me
informations
> about the domain the server belong and if the server is a DC or not (if
not,
> who is its DC).
You didn't indicate command line the first time, but
there are several tools:
nltest /dclist
omain_Name
....gets the list of DCs and shows the PDC (emulator)
NLTest /DSGetDC can get a bunch of different special roles/jobs:
/DSGETDC:<DomainName> -
Call DsGetDcName /PDC /DS /DSP /GC /KDC
/TIMESERV /GTIMESERV /NETBIOS /DNS /IP
/FORCE /WRITABLE /AVOIDSELF /LDA
DCDiag returns the names of the role holders as part of it's checks
that they are working. (But it's buried deep in the output.)
I couldn't get (the obvious tool) NTDSUtil to do it with a few
minutes testing -- NTDSUtil will transfer roles and you can
inspect a specific server but it doesn't seem to list those roles
if you don't know where they are located.
You didn't indicate the reason for needing a command line, but
if you don't like the easy GUI method then likely you are trying
to automate something and that means you will likely find the
above less that ideal (verbose output that will need to be
piped through Perl or find etc.)
I suspect a combination of DSQuery Servers and perhaps
DSGet servers might do it but I didn't work out the switches
needed.