Two problems with that, Mark. My ADSI reference says that the role property of iadscomputer isn't supported through the WinNT provider, and as Chris doesn't have AD, yet - that's all he's got. And it (apparently - never tried to use it, personally) only differentiates between servers and workstations (according to my reference). Looks like the WMI code might identify - but it will require local WMI support. Neil > -----Original Message----- > From: Mark Schill [mailto:Mark.Schill@xxxxxxxxxxxx] > Sent: 15 November 2002 20:31 > To: thin@xxxxxxxxxxxxx > Subject: [THIN] Re: OT: VBScript/WSH/WMI question. > > 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. > > > 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. > > > > - --------------------------------------------------------------- > > 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." > > - --------------------------------------------------------------- *********************************************************************** This e-mail and its attachments are intended for the above named recipient(s) only and are confidential and may be privileged. If they have come to you in error you must take no action based on them, nor must you copy or disclose them or any part of their contents to any person or organisation; please notify the sender immediately and delete this e-mail and its attachments from your computer system. Please note that Internet communications are not necessarily secure and may be changed, intercepted or corrupted. We advise that you understand and observe this lack of security when e-mailing us and we will not accept any liability for any such changes, interceptions or corruptions. Although we have taken steps to ensure that this e-mail and its attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. Copyright in this e-mail and attachments created by us belongs to Littlewoods. Littlewoods takes steps to prohibit the transmission of offensive, obscene or discriminatory material. If this message contains inappropriate material please forward the e-mail intact to postmaster@xxxxxxxxxxxxxxxxx and it will be investigated. Statements and opinions contained in this e-mail may not necessarily represent those of Littlewoods. Please note that e-mail communication may be monitored. Registered office: Littlewoods Retail Limited, Sir John Moores Building, 100 Old Hall Street, Liverpool, L70 1AB Registered no: 421258 http://www.littlewoods.com *********************************************************************** *********************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm