i am working on a script to pull all of the servers out of my active directory structure. so far the way i have decided to do it is by using an existing script i have that runs through all of the machines in my structure & the filtering based on operating system.
so here is the script i have to dump the machines
domain = Array(*list of domains*)
strOutputFile = "MachineDump.xls"
Set objfso = CreateObject("Scripting.FileSystemObject")
Set tf = objfso.CreateTextFile(strOutputFile, True)
for j = 0 to 15
strDomain = domain(j) & "*rest of domain*"
set objContainer = GetObject("WinNT://" & strDomain)
objContainer.filter = Array("Computer")
for each objMember in objContainer
tf.writeline objMember.Name
' wscript.echo objMember.Name
next
next
wscript.echo("done")
is there a property to pull the operating system? am i going about this incorrectly?
thanks in advance
so here is the script i have to dump the machines
domain = Array(*list of domains*)
strOutputFile = "MachineDump.xls"
Set objfso = CreateObject("Scripting.FileSystemObject")
Set tf = objfso.CreateTextFile(strOutputFile, True)
for j = 0 to 15
strDomain = domain(j) & "*rest of domain*"
set objContainer = GetObject("WinNT://" & strDomain)
objContainer.filter = Array("Computer")
for each objMember in objContainer
tf.writeline objMember.Name
' wscript.echo objMember.Name
next
next
wscript.echo("done")
is there a property to pull the operating system? am i going about this incorrectly?
thanks in advance