Extracting group memberships

I am have a list of active directory computers on a file, and I would like to see for each of one them, what groups they belong to. It is very long when you have 200-300 to do manually, but I think with a script it takes a few seconds. I would really appreciate your help. I have tried the search before asking for help but I couldn't find what I want :(