Does anyone know how to create a script that can export the list of users and their respective right's to a text file or log?

Help?
_________________________
-Jon