Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

AD PowerShell - Replace nested groups with members of said group

$
0
0

We are cleaning up AD and it's a bear to do manually.  What I have:

  • ProjectXYZ (Role Group)
    • Members:
      • DepartmentJ (Role Group)
      • User 1
      • User 2

What I want:
  • ProjectXYZ (Role Group)
    • Members:
      • User 1
      • User 2
      • User 3
      • User 4
      • User 5

Basically, the idea is to extract the users from the nested AD Group, store it, add them back into ProjectXYZ role group.  When completed, delete the nested Role Group, close the project and go drink something strong.


Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>