title: Add users to a certain AD group depending on their Department
body: <p>I want to automatically add users from a specific Department to a specific AD Security Group.</p>
  
  <p>For example, add all users with the AD Department attribute <code>Sales</code>, <code>Reception</code> or <code>Finance</code> to the Security Group called <code>APP Group</code>.</p>
  
  <p>I've managed to come up with the code beneath which only <strong>displays</strong> the users regarding the specific Departments.</p>
  
  <p>Can someone explain me how to expand this code so the Users are added to the security group?</p>
  
  <pre><code>Get-ADUser -Filter * -Properties department | 
      Where-Object {$_.department -Like "Sales" -or $_.department -Like "Reception" -or $_.department -Like "Finance"} | 
          Select sAMAccountName, department
  </code></pre>