VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ADSI sample - List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain is a com

by Anonymous (267 Submissions)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

ADSI sample - List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain is a computer, all groups of the local SAM database

Rate ADSI sample - List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain is a com



' List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain
' is a computer, all groups of the local SAM database are displayed.

' Goto http://www.activxperts.com/activmonitor and click on ADSI Samples
' for more samples


Sub ListGroups( strDomain )
Set objComputer = GetObject("WinNT://" & strDomain )
objComputer.Filter = Array( "Group" )
For Each objGroup In objComputer
WScript.Echo "Name: " & objGroup.Name
Next
End Sub



' Main

Dim strDomain
Do
   strDomain = inputbox( "Please enter a domainname", "Input" )
Loop until strDomain <> ""

ListGroups( strDomain )


WScript.Echo( vbCrlf & "For more samples, goto http://www.activxperts.com/activmonitor and click" )
WScript.Echo( "on ADSI" )

Download this snippet    Add to My Saved Code

ADSI sample - List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain is a com Comments

No comments have been posted about ADSI sample - List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain is a com. Why not be the first to post a comment about ADSI sample - List all groups in a Windows 2000 AD domain or Windows NT4 domain. If domain is a com.

Post your comment

Subject:
Message:
0/1000 characters