Chris, This might be of some help. When you enumerate the computers in the domain see what the 'Role' property provides. I.E. oComputer1.Role I am not sure if it determines the PDC or just if it is a domain controller. Let me know if that helps. Mark > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have created a script (along with another engineer) to gather useful = > information in a specific domain. It will scan for all "computer" = > objects, and query some WMI stuff from them. BUT, I cannot get the = script > to "find" the PDC. It "finds" and queries the > BDC in the domain just fine. If I specify the PDC servers name in the = > script, the script will connect to WMI and query the information we = need. > I don't want to have to enter in the server name for every time = we run > this script. > > Below, you will find a sample of how we "find" computer/server objects = > using the WINNT provider. We are not running AD, but are planning the = > migration. We already have another script for the ADSI provider. > > Thanks, > > Chris Lynch, MCSE CCNA CCA > Network Engineer > Axcent Solutions > clynch@xxxxxxxxxxxxxxxxxxx > (949) 338-1904 > > - --------------------------------------------------------------- > Option explicit > Dim oContainer, oComputer1, oNetwork > Dim sDomainName, sComputer > Set oNetwork =3D WScript.CreateObject("WScript.Network") > sDomainName =3D oNetwork.UserDomain > > Set oContainer =3D GetObject("WinNT://" & sDomainName) > oContainer.Filter =3D Array("computer") > For Each oComputer1 in oContainer > sComputer =3D oComputer1.Name > Wscript.Echo oComputer1.Name > Next > > MsgBox "DONE." > - --------------------------------------------------------------- > > -----BEGIN PGP SIGNATURE----- > Version: PGP 8.0 (Build 294) Beta > Comment: Public PGP key for Chris Lynch > > iQA/AwUBPdQ5Audk9GeQ3R5SEQK4OACeNku3rw9CCGHXg9m67t5LMezq4OsAniwm > XUr4t3zBFkKdJT7gXDDB5m+T > =3DaizX > -----END PGP SIGNATURE----- > > > > *********************************************** > For Archives, to Unsubscribe, Subscribe or > set Digest or Vacation mode use the below link. > > http://thethin.net/citrixlist.cfm *********************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm