• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

add group to another group

How can I add one group to another group?  I am not just looking to copy the members but actually make the group name part of another group?  

Sort of like this but it didn't do anything.

Add-ADGroupMember -Identity group1 -Members group2
0
Roccat
Asked:
Roccat
1 Solution
 
Spencer SchererSystems AdministratorCommented:
Firstly, if you didn't already know, -identity will be the target group to receive the other groups members,  So it may not give you an error, did you check the other groups membership to see if it worked in reverse of what you planned?  If it did not run, what was the error you received?  The code itself looks like it should work otherwise, as long as you have the group names properly entered.
0
 
RoccatAuthor Commented:
Yes you are right, it does work. Not sure what I was looking at earlier. Thanks.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now