The script below queries Active directory looking for a specific security group it works great, but what i want is for it to write the name of the group to the end of every line it creates.
[red]EXAMPLE
Hoffa, Jim xxxxxxx myadgroup1[/red] the myadgroup1 i want to add to every line of this group query.
set fso = createobject("scripting.filesystemobject")
set fh = fso.createtextfile("ADGROUP.txt")
set groupObj = getobject("LDAP://cn=ADGROUPNAME,ou=securityteam,ou=securitygroups,ou=process,dc=lcc,dc=usairways,dc=com")
count = 0
for each member in groupObj.members
WScript.echo Member.displayname & " ; " & Member.lcchirschbadgenum '
fh.writeline member.displayname & " ; " & Member.lcchirschbadgenum '
count = count + 1
NEXT
fh.close
wscript.echo "Total members: " & count
Thanks in advance for your help.
[red]EXAMPLE
Hoffa, Jim xxxxxxx myadgroup1[/red] the myadgroup1 i want to add to every line of this group query.
set fso = createobject("scripting.filesystemobject")
set fh = fso.createtextfile("ADGROUP.txt")
set groupObj = getobject("LDAP://cn=ADGROUPNAME,ou=securityteam,ou=securitygroups,ou=process,dc=lcc,dc=usairways,dc=com")
count = 0
for each member in groupObj.members
WScript.echo Member.displayname & " ; " & Member.lcchirschbadgenum '
fh.writeline member.displayname & " ; " & Member.lcchirschbadgenum '
count = count + 1
NEXT
fh.close
wscript.echo "Total members: " & count
Thanks in advance for your help.