ok, correct me if I'm wrong.
1 Ingroup checks for membership of ALL of the groups in the list. Isn't that what I want to accomplish? ..to check to see in all this groups if the user is member or not and to map the drive and the printer depends of the group. When I run the script it maps just the first group in the list and skips the rest, works fine if the user is member of one group