I have a vbscript that needs to get a list of all the DCs in a given domain,
be it NT4 or AD, but I don't know how.

Any ideas?

Thanks,
rb

Re: Retrieving DC list by Richard

Richard
Mon Jun 20 20:06:53 CDT 2005

Raymond Balaian wrote:

> I have a vbscript that needs to get a list of all the DCs in a given
domain,
> be it NT4 or AD, but I don't know how.

Hi,

This program should help:

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

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



Re: Retrieving DC list by Ato

Ato
Mon Jun 20 20:28:07 CDT 2005

Hello Richard,

Will the EnumDCs script also catch NT4 DCs in a mixed mode environment?

TIA,
Ato



"Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in message
news:e$vfp3fdFHA.1040@TK2MSFTNGP10.phx.gbl...
> Raymond Balaian wrote:
>
> > I have a vbscript that needs to get a list of all the DCs in a given
> domain,
> > be it NT4 or AD, but I don't know how.
>
> Hi,
>
> This program should help:
>
> http://www.rlmueller.net/Enumerate%20DCs.htm
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab web site - http://www.rlmueller.net
> --
>
>



Re: Retrieving DC list by Richard

Richard
Mon Jun 20 20:54:43 CDT 2005

I don't have NT4 DC's in my domain, but there is a quick way to check.
Using something like ADSI Edit (part of the Windows 2000 Support Tools)
check the Configuration Container of your AD. In "Configuration Container",
"cn=configuration,dc=MyDomain,dc=com", "CN=Sites", "CN=MySite", "CN=Servers"
you will see all of the DC's in the site. They all have a "CN=NTDS Settings"
object. The script I linked simply enumerates the machines in the
"CN=Servers" container (for all sites) that have "CN=NTDS Settings". For a
specific NT machine, look in the appropriate site container.
"dc=MyDomain,dc=com" is your domain name and "CN=MySite" is an example site
container.

Also, see if the script lists your NT4 DC's.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--
"Ato Bisda" <atobisda@gmail.com> wrote in message
news:u85mACgdFHA.3012@tk2msftngp13.phx.gbl...
> Hello Richard,
>
> Will the EnumDCs script also catch NT4 DCs in a mixed mode environment?
>
> TIA,
> Ato
>
>
>
> "Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in
message
> news:e$vfp3fdFHA.1040@TK2MSFTNGP10.phx.gbl...
> > Raymond Balaian wrote:
> >
> > > I have a vbscript that needs to get a list of all the DCs in a given
> > domain,
> > > be it NT4 or AD, but I don't know how.
> >
> > Hi,
> >
> > This program should help:
> >
> > http://www.rlmueller.net/Enumerate%20DCs.htm
> >
> > --
> > Richard
> > Microsoft MVP Scripting and ADSI
> > Hilltop Lab web site - http://www.rlmueller.net
> > --
> >
> >
>
>



Re: Retrieving DC list by Ato

Ato
Mon Jun 20 22:22:57 CDT 2005

Hi Richard,

I have to confess that my question was more theoretical than anything else since my domain also has
no NT4 DCs.

I was able to appreciate your algorithm though by wading through the AD Configuration Container and
noting that
DCs consistently have that "CN=NTDS Settings" object.

Regards,
Ato

"Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in message
news:eiENYSgdFHA.2124@TK2MSFTNGP14.phx.gbl...
> I don't have NT4 DC's in my domain, but there is a quick way to check.
> Using something like ADSI Edit (part of the Windows 2000 Support Tools)
> check the Configuration Container of your AD. In "Configuration Container",
> "cn=configuration,dc=MyDomain,dc=com", "CN=Sites", "CN=MySite", "CN=Servers"
> you will see all of the DC's in the site. They all have a "CN=NTDS Settings"
> object. The script I linked simply enumerates the machines in the
> "CN=Servers" container (for all sites) that have "CN=NTDS Settings". For a
> specific NT machine, look in the appropriate site container.
> "dc=MyDomain,dc=com" is your domain name and "CN=MySite" is an example site
> container.
>
> Also, see if the script lists your NT4 DC's.
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab web site - http://www.rlmueller.net
> --
> "Ato Bisda" <atobisda@gmail.com> wrote in message
> news:u85mACgdFHA.3012@tk2msftngp13.phx.gbl...
> > Hello Richard,
> >
> > Will the EnumDCs script also catch NT4 DCs in a mixed mode environment?
> >
> > TIA,
> > Ato
> >
> >
> >
> > "Richard Mueller [MVP]" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in
> message
> > news:e$vfp3fdFHA.1040@TK2MSFTNGP10.phx.gbl...
> > > Raymond Balaian wrote:
> > >
> > > > I have a vbscript that needs to get a list of all the DCs in a given
> > > domain,
> > > > be it NT4 or AD, but I don't know how.
> > >
> > > Hi,
> > >
> > > This program should help:
> > >
> > > http://www.rlmueller.net/Enumerate%20DCs.htm
> > >
> > > --
> > > Richard
> > > Microsoft MVP Scripting and ADSI
> > > Hilltop Lab web site - http://www.rlmueller.net
> > > --
> > >
> > >
> >
> >
>
>



Re: Retrieving DC list by Raymond

Raymond
Mon Jun 20 23:01:33 CDT 2005

Thanks Richard, but I wouldn't post here without exhausting rlmueller.net
first ;-)

Some of the domains that I'll be targeting are purely NT4 domains, which are
the ones that are most troublesome.
Might I be limited to using some of the Net* api's?

rb