Hello! , I need a text file with all email address of members of a group in Active Directory...Iīm trying do it with Groupmembers() and GetADUserProperties() UDF functions, but it only show me an error on GetADUserProperties() UDF function and I canīt to find it...

Break on
$users = groupmembers("DOMAIN", "GROUP")
For Each $user in $users
? getADuserproperties("Email", "$user")
Sleep 0.2
Next

Can you help me, please?? Thanks