query server for Shares then get groups and ADusers

I want to query a specific server "blah.com" for a list of shares which begin with the name xx and from the shares get the AD groups that has access to those shares and from the ADgroups ideally i'd like username and email of the ADgroupmembers belonging to the groups