title: How to copy members from one security group to another security group in AD using PowerShell v4?
body: <p>I'm relatively new to PowerShell and am trying to learn it for a project at work involving Active Directory. The task I have is to compare the members of two different security groups in AD (both groups are located in the same OU) and copy the members from Group 2 that are not in Group 1 over to Group 1. </p>
  
  <p>I came across <a href="http://ravingroo.com/1030/powershell-compare-membership-of-two-active-directory-groups/" rel="nofollow noreferrer">this link</a> that showed how to compare groups but:</p>
  
  <ol>
  <li>The code segment listed on this website returns both the members from Group 1 that aren't in Group 2 and the members from Group 2 that aren't in Group 1 which is way more information than I need</li>
  <li>Once I get the list I don't know how to use that to enter into a command or script to copy those members to the appropriate group.</li>
  </ol>