and the same thing in UDF format:

Code:
 
break on

for each $name in EnumGroup('somegroup')
? $name
endif



Code:
 
Function EnumGroup($group, Optional $Domain)
DIM $users, $obj
if not $domain $domain = @domain endif
$obj = GetObject("WinNT://"+$domain+"/"+$group+",group")
IF not $obj exit 1 endif
for each $user in $obj.members
$users=$users + '|' + $user.name
next
$obj = 0
$EnumGroup = split(substr($users,2),'|')
EndFunction

_________________________
How to ask questions the smart way <-----------> Before you ask