Error below:
C:\scripts\lcompbydom.vbs(104, 2) Microsoft VBScript runtime error: Object
required: 'DOMAIN1'
Here is what I'm trying to do.
1. Read in file with entries including valid domain names. Each line has 1
entry.
DOMAIN1
DOMAIN2
DOMAIN3
2. Each line is read and added to the array.
3. Then I want to find each computer in each domain which is an entry in the
array.
4. Get the error on the first entry.
Here is the section with the lines referenced in the message
'Open INPUT file for reading selected domains
Set objFSO = CreateObject("Scripting.FileSystemObject")
strInFullName = objFSO.BuildPath(strInPath, strDataInFileName)
Set objInputFile = objFSO.OpenTextFile (strInFullName, FOR_READING)
Do Until objInputFile.AtEndOfStream
Redim Preserve arrDataInput(Index)
arrDataInput(Index) = objInputFile.Readline
Index = Index + 1
Loop
objInputfile.Close
' The next line is #104
For DataItem = LBound(arrDataInput) to UBound(arrDataInput) Step 1
objDomain = arrDataInput(DataItem)
Set objUseDomain = GetObject("WinNT://" & objDomain.Name)
objUseDomain.Filter = Array("Computer")
ParseComputers
Next
Thanks!