title: Add a member to a group with DirectoryServices
body: <p>I create a group in my Active Directory with DirectoryServices.</p>
  
  <pre><code>Imports System.DirectoryServices
  Imports ActiveDs
  
  Module Module1
  
  Sub Main()
  
      Dim dom As New DirectoryEntry()
  
      Dim ou As DirectoryEntry = dom.Children.Find("OU=projects")
  
      Dim group As DirectoryEntry = ou.Children.Add("CN=pracmans", "group")
  
      group.Properties("Description").Value = "Red Bull"
  
      group.Properties("groupType").Value = ActiveDs.ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_UNIVERSAL_GROUP Or ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_SECURITY_ENABLED
  
      group.Properties("samAccountName").Value = "pracmans"
  
      group.CommitChanges()
  
  End Sub
  
  End Module
  </code></pre>
  
  <p>Source: <a href="https://msdn.microsoft.com/en-us/library/ms180903(v=VS.90).aspx" rel="nofollow">msdn</a></p>
  
  <p>This works perfectly. </p>
  
  <p>Now I want to add an existing User as a member to this group. (as descripted <a href="https://msdn.microsoft.com/en-us/library/ms180904(v=vs.80).aspx" rel="nofollow">here</a>)</p>
  
  <p>So I added </p>
  
  <pre><code>group.Properties("member").Add("CN=John Doe,OU=Employee,OU=London,DC=me,DC=intra")
  </code></pre>
  
  <p>If I run the script now it stops at the <code>CommitChanges()</code> an tells me that the server isn't able to execute my request. </p>
  
  <p>Do I miss something? </p>
  
  <p>Thanks in advance for any advice. </p>