#37274 - 2003-03-04 03:06 PM
ADS memberlist output to textfile
|
Anonymous
Anonymous
Unregistered
|
Hi
I browsed and searched this forum a bit and found some nice ideas for scripts i have to use.
I have to get a userlist in textfile from our ADS and when i use this script all seems fine:
$LogFile = test.txt $DomObj = getobject("WinNT://xxx.xxx.com,domain") $DomObj.filter = "user","" for each $user in $DomObj ? $user.name next
when i add the REDIRECTOUTPUT command the output is only ZK18187, the last user in alphabetical order:
$LogFile = test.txt $DomObj = getobject("WinNT://xxx.xxx.com,domain") $DomObj.filter = "user","" for each $user in $DomObj ;? $user.name
IF REDIRECTOUTPUT($LogFile,1) = 0 ? $user.name ENDIF
next
What am i doing wrong ? We have Win200 ADS with about 9000 users.
Help appreciated for a scripnewbie.
thanks.
|
|
Top
|
|
|
|
#37281 - 2003-03-04 03:18 PM
Re: ADS memberlist output to textfile
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Just to be somewhat of a contrarian here, I don't like Redirectoutput and prefer using Writelog2() UDF for output. I have no good reason for my dislike of Redirectoutput, just offering a different flavor of ice cream. [ 04. March 2003, 15:18: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#37285 - 2003-03-04 03:27 PM
Re: ADS memberlist output to textfile
|
Anonymous
Anonymous
Unregistered
|
sealeopard, jpols many thanks for your comments.
You were right about the loop and its working great now, have to say i just started this (again) a bit, getting loads of good stuff from this forum tho.
Thanks again for the fast replies.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1334 anonymous users online.
|
|
|