I spotted a post on Reddit sysadmin forum today where an EV administrator was explaining that the previous administrator had added over 1,000 individual users to a Provisioning Group and how could he export the list of usernames. Because I am inquisitive sort of person i decide to set myself the challenge of doing this using a T-SQL script. So after a bit of thinking about joins, here is what I came up with:
ON PolicyTargetMember.PolicytargetGroupEntryID = PolicyTargetGroup.PolicyTargetGroupEntryID
WHERE PolicyTargetGroup.DisplayName = ‘Department Heads’
I hope someone finds this useful.