[THIN] Re: OT: VBScript/WSH/WMI question.

  • From: "Chris Lynch" <lynch00@xxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Fri, 15 Nov 2002 08:27:10 -0800

=20
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok, but how does this help me in a Windows NT 4 Domain environment?  We =
are in the process of designing the Windows 2000 AD Upgrade process, but =
need to gather information about the current environment.

Thanks,

Chris Lynch, MCSE CCNA CCA
Network Engineer
Axcent Solutions
clynch@xxxxxxxxxxxxxxxxxxx
(949) 338-1904=20

- -----Original Message-----
From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On =
Behalf Of Nail, Larry
Sent: Friday, November 15, 2002 7:50 AM
To: 'thin@xxxxxxxxxxxxx'
Subject: [THIN] Re: OT: VBScript/WSH/WMI question.



Chris,

Off the top of my head... In ADSI, a Domain Controller has a USERFLAGS =
entry
of &H2000.    You should be able to chase down an attribute of the =
computer
object in a domain that would tell you it it's the PDC.

Just a thought,
Larry

- -----Original Message-----
From: Chris Lynch [mailto:lynch00@xxxxxxx]=20
Sent: Thursday, November 14, 2002 6:00 PM
To: TheThin. net
Subject: [THIN] OT: VBScript/WSH/WMI question.



=3D20
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have created a script (along with another engineer) to gather useful =
=3D information in a specific domain.  It will scan for all "computer" =
=3D objects, and query some WMI stuff from them.  BUT, I cannot get the =
=3D 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  =3D script, =
the script will connect to WMI and query the information we =3D need.  I =
don't want to have to enter in the server name for every time =3D we run =
this script.

Below, you will find a sample of how we "find" computer/server objects =
=3D using the WINNT provider.  We are not running AD, but are planning =
the =3D 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 =3D3D WScript.CreateObject("WScript.Network")
  sDomainName =3D3D oNetwork.UserDomain

  Set oContainer =3D3D GetObject("WinNT://" & sDomainName)
  oContainer.Filter =3D3D Array("computer")
  For Each oComputer1 in oContainer
    sComputer =3D3D 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
=3D3DaizX
- -----END PGP SIGNATURE-----



***********************************************=20
For Archives, to Unsubscribe, Subscribe or=20
set Digest or Vacation mode use the below link.

http://thethin.net/citrixlist.cfm

***********************************************=20
For Archives, to Unsubscribe, Subscribe or=20
set Digest or Vacation mode use the below link.

http://thethin.net/citrixlist.cfm

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0 (Build 294) Beta
Comment: Public PGP key for Chris Lynch

iQA/AwUBPdUgUedk9GeQ3R5SEQJDBQCglTxfzkF1hhU1LRB3Iiix91qgr7kAniWf
F3YlRii36iuvYaKdLqzRRddY
=3D27kW
-----END PGP SIGNATURE-----



*********************************************** 
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link.

http://thethin.net/citrixlist.cfm

Other related posts: