# Recursive group membership of user matching criteria

**URL:** <https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740>\
**Category:** PowerShell Help\
**Created:** [July 30, 2020, 9:13am UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740 "2020-07-30T09:13:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivoham\_1986](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@shivoham\_1986](https://forums.powershell.org/u/shivoham_1986)\
**Post date:** [July 30, 2020, 9:13am UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740/1 "2020-07-30T09:13:52Z")

</div>

Hello,

I need script or cmdlet to retrieve all groups name which contains string “Proxy” that user is member of either directly or recursively (group that is member of another group and so on).

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![grokkit](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/grokkit/32/970_2.png) [@grokkit](https://forums.powershell.org/u/grokkit)\
**Post date:** [July 30, 2020, 11:27am UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740/2 "2020-07-30T11:27:18Z")

</div>

What have you tried already?

---

<div class="post-metadata">

**Author:** ![meropr](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@meropr](https://forums.powershell.org/u/meropr)\
**Post date:** [July 30, 2020, 11:47am UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740/3 "2020-07-30T11:47:23Z")

</div>

Group from where? AD?

---

<div class="post-metadata">

**Author:** ![shivoham\_1986](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@shivoham\_1986](https://forums.powershell.org/u/shivoham_1986)\
**Post date:** [July 30, 2020, 3:21pm UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740/4 "2020-07-30T15:21:40Z")

</div>

yes, all groups from AD that matches the criteria

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 30, 2020, 8:54pm UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740/5 "2020-07-30T20:54:58Z")

</div>

Gaurav

This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

What have you tried so far? We expect you to make an own attempt to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/recursive-group-membership-of-user-matching-criteria/14740/6 "2024-05-16T20:29:08Z")

</div>

Closed on May 16, 2024, 8:29pm UTC


