Lists all the 'MembersOf' tab of a Computer object

' Lists all the 'MembersOf' tab of a Computer object
' Example: Below script will list the 'memberof' tab of Testserver1 object

On Error Resume Next

Set objGroup = GetObject _
  ("ldap://CN=Testserver1,OU=Country,DC=Home,DC=com/")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("memberof")

WScript.Echo "MembersOF:"
For Each strMember in arrMemberOf
    WScript.echo strMember
Next

' End of Script

***Share your comments about the post***

No comments:

Post a Comment