REDIRECTOUTPUT is a 'toggle', thus should not be within a loop. Alternatively, use OPEN/WRITELINE/CLOSE. See also the FAQ Forum under File Input/Output Primer . And please post scripts code in between CODE tags as specified in the FAQ Forum.
code:
$LogFile = test.txt
$DomObj = getobject("WinNT://xxx.xxx.com,domain")
$DomObj.filter = "user",""
$rc=REDIRECTOUTPUT($LogFile,1)
for each $user in $DomObj
? $user.name
next
$rc=REDIRECTOUTPUT('')



[ 04. March 2003, 15:12: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.