Thank you for your replies.
Glenn i have written a test-script integrating your udf-example but it doesn´t work. where could be the mistake?

when i am testing it the result will be:

result: ADSIUserInfo()



this is a cuttet example of the script:

$test="ADSIUserInfo()"
?"result: $test"

;;
;;======================================================================
;;
;;FUNCTION ADSIUserInfo()
;;
;;ACTION Get or Set a user attribute via ADSI
;;
;;AUTHOR Glenn Barnas
.
.
.
If Not $_AValid Exit 87 EndIf ; no valid values
EndIf

Exit @ERROR


EndFunction

thank you for your answer

Frank