I think I am bumping into the fact that I am using PS for a user facing tool, and most of the examples I find are obviously much more focused on administrator tasks. To wit, I need to just return a true or false, if a user is a member of a specified group, and the group could be either a local group or a domain group. And thus far it looks like I will need to
1: determine if the machine is on a domain or not
2: have one rather large block of code to test against domain groups
3: have another rather simpler block of code to test against local groups.
Before I travel down this path, I wonder if there isn't some easier option I am missing. One that works in PSv2?