{"id":1376,"date":"2012-05-05T09:34:16","date_gmt":"2012-05-05T09:34:16","guid":{"rendered":"https:\/\/www.buarotti.ch\/?p=1376"},"modified":"2012-05-22T09:40:18","modified_gmt":"2012-05-22T09:40:18","slug":"1376","status":"publish","type":"post","link":"https:\/\/www.buarotti.ch\/?p=1376","title":{"rendered":"Enumurate AD Group Members"},"content":{"rendered":"<p>Active Directory Gruppen Members in TXT File exportieren.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\nDim arrNames()\r\nintSize = 0\r\n\r\n' Domain Admins DistinguishedName aus Domain\r\nSet objGroup = GetObject(&quot;LDAP:\/\/CN=Domain Admins,CN=Users,DC=yourdomain,DC=net&quot;)\r\n\r\nSet objfs = CreateObject(&quot;Scripting.FileSystemObject&quot;)\r\nSet objTextfile = objfs.OpenTextFile(&quot;Group_DomainAdmins.txt&quot;, 8, True)\r\n\r\nFor Each strUser in objGroup.Member\r\nSet objUser =\u00a0 GetObject(&quot;LDAP:\/\/&quot; &amp; strUser)\r\nReDim Preserve arrNames(intSize)\r\narrNames(intSize) = objUser.CN\r\nintSize = intSize + 1\r\nNext\r\n\r\nFor i = (UBound(arrNames) - 1) to 0 Step -1\r\nFor j= 0 to i\r\nIf UCase(arrNames(j)) &gt; UCase(arrNames(j+1)) Then\r\nstrHolder = arrNames(j+1)\r\narrNames(j+1) = arrNames(j)\r\narrNames(j) = strHolder\r\nEnd If\r\nNext\r\nNext\r\n\r\nFor Each strName in arrNames\r\n'Wscript.Echo strName\r\nobjTextfile.Write strName &amp; vbNewLine\r\nNext\r\n\r\nWscript.Echo &quot;Script Finish&quot;\r\nWscript.Quit\r\n\r\n<\/pre>\n<p>Original Quelle:<br \/>\n<a title=\"Technet Blog\" href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2004\/11\/23\/how-can-i-list-the-members-of-a-group-in-alphabetical-order.aspx\" target=\"_blank\">http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2004\/11\/23\/how-can-i-list-the-members-of-a-group-in-alphabetical-order.aspx<\/a><\/p>\n<h3>Related Images:<\/h3>","protected":false},"excerpt":{"rendered":"<p>Active Directory Gruppen Members in TXT File exportieren. Dim arrNames() intSize = 0 &#8218; Domain Admins DistinguishedName aus Domain Set objGroup = GetObject(&quot;LDAP:\/\/CN=Domain Admins,CN=Users,DC=yourdomain,DC=net&quot;) Set objfs = CreateObject(&quot;Scripting.FileSystemObject&quot;) Set objTextfile = objfs.OpenTextFile(&quot;Group_DomainAdmins.txt&quot;, 8, True) For Each strUser in objGroup.Member Set objUser =\u00a0 GetObject(&quot;LDAP:\/\/&quot; &amp; strUser) ReDim Preserve arrNames(intSize) arrNames(intSize) = objUser.CN intSize = intSize + [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[58,11],"tags":[],"class_list":["post-1376","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-vbscript"],"_links":{"self":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts\/1376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1376"}],"version-history":[{"count":4,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts\/1376\/revisions"}],"predecessor-version":[{"id":1380,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts\/1376\/revisions\/1380"}],"wp:attachment":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}