title: How can I rewrite this using C#, but keeping it COM based?
body: <p>I have a function that is in a vbs file. </p>
  
  <p>I want a 1:1 copy of the functionality using COM, but want it in a C# console app. Is this possible?</p>
  
  <pre><code>Const ADS_GROUP_TYPE_UNIVERSAL_GROUP = &amp;h8
  set dso=GetObject("LDAP:")
  Set objOU = GetObject("LDAP://ou=Sales,dc=NA,dc=fabrikam,dc=com")
  Set objGroup = objOU.Create("Group", "cn=Customers")
  objGroup.Put "sAMAccountName", "customers"
  objGroup.Put "groupType", ADS_GROUP_TYPE_UNIVERSAL_GROUP
  objGroup.SetInfo
  </code></pre>
  
  <p>Thanks in advance.</p>