Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List the Members of a Group in Alphabetical OrderContent of List the Members of a Group in Alphabetical Order.vbsMD5 Hash: 46DCA21FB82B93F8569E083CB5EA5CBB |
||
Dim arrNames()
intSize = 0 Set objGroup = GetObject("LDAP://CN=Accountants,OU=Finance,DC=fabrikam,DC=com") For Each strUser in objGroup.Member Set objUser = GetObject("LDAP://" & strUser) ReDim Preserve arrNames(intSize) arrNames(intSize) = objUser.CN intSize = intSize + 1 Next For i = (UBound(arrNames) - 1) to 0 Step -1 For j= 0 to i If UCase(arrNames(j)) > UCase(arrNames(j+1)) Then strHolder = arrNames(j+1) arrNames(j+1) = arrNames(j) arrNames(j) = strHolder End If Next Next For Each strName in arrNames Wscript.Echo strName Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |