<p>I'm trying to set the group type for a new Active Directory Entry via VB.NET and DirectoryServices to create a distribution list.</p>

<p>How do I access the ADS_GROUP_TYPE enumerations?</p>

<p>Specifically I'm after ADS_GROUP_TYPE_GLOBAL_GROUP.</p>

[{'answer_id': 9617, 'author': 'David A Gibson', 'author_id': 982, 'author_profile': 'https://Stackoverflow.com/users/982', 'pm_score': 0, 'selected': False, 'text': '<p>I don\'t think I can access the enumerations via .NET so instead I created the specific constant I needed. For what it\'s worth here\'s my code:</p>\n\n<blockquote>\n<pre><code>        Const ADS_GROUP_TYPE_GLOBAL_GROUP As Object = &amp;H2\n        adNewGroup.Properties("groupType").Value = ADS_GROUP_TYPE_GLOBAL_GROUP\n</code></pre>\n</blockquote>\n\n<p>Refactoring welcome!</p>\n'}, {'answer_id': 9638, 'author': 'Kev', 'author_id': 419, 'author_profile': 'https://Stackoverflow.com/users/419', 'pm_score': 1, 'selected': True, 'text': "<p>You're correct, you can't actually get access to the enumerations. </p>\n\n<p>Just a wee nitpick, this constant doesn't need to be an object, you can make it an int32 -</p>\n\n<p>Const ADS_GROUP_TYPE_GLOBAL_GROUP As Object = &amp;H2</p>\n"}, {'answer_id': 2125986, 'author': 'Varun Sharma', 'author_id': 257681, 'author_profile': 'https://Stackoverflow.com/users/257681', 'pm_score': 1, 'selected': False, 'text': '<p>Add a reference to the com ActiveDS Dll and import the namespace using ActiveDS, then you will get the above enum value.</p>\n'}]
['https://Stackoverflow.com/questions/9612', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/982/']