I am trying to do some querying on the "Members" field (for example, Local Users and Groups > Local Groups > Administrators) but I am running into some trouble. I'd like to construct a query that returns all locally-created accounts, not domain accounts. If I have a system that has "hostname123\Administrator; domain.com\Domain Admins; hostname123\user1" I'd like this to be returned in the results. However, if a system has "hostname456\Administrator; domain.com\Domain Admins; domain.com\user9" it should not be returned.
I think I'd be able to figure it out if I could use the "Device Name" as a variable in a query. Any thoughts or other guidance on how to achieve this would be welcome! I am thinking this might be easier done in SQL but I'm still in the beginning stages of learning SQL.