Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

add group to another group

Posted on 2016-10-27
2
50 Views
Last Modified: 2016-10-27
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
Comment
Question by:Roccat
2 Comments
 
LVL 3

Accepted Solution

by:
Spencer Scherer earned 500 total points
ID: 41862798
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
 

Author Closing Comment

by:Roccat
ID: 41862879
Yes you are right, it does work. Not sure what I was looking at earlier. Thanks.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
A procedure for exporting installed hotfix details of remote computers using powershell
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question