Re: Enumerate members of Administrators Group (AD)

Tech-Archive recommends: Fix windows errors by optimizing your registry



Tested your new script. Added quotes around the LDAP directory name.
Results are:
"TEST**Exception** System.Runtime.InteropServices.COMException
(0x80072030): There is no such object on the server at
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at
System.DirectoryServices.DirectoryEntry.Bind() at
System.DirectoryServices.DirectoryEntry.get_AdsObject() at
System.DirectoryServices.DirectorySearcher.FindAll(Boolean
findMoreThanOne) at
System.DirectoryServices.DirectorySearcher.FindAll() at "

Right now not looking for "ou=Domain Admins" I am looking for
"cn=Administrators,cn=Builtin," I changed your code to:
"LDAP://cn=Administrators,cn=Builtin,dc=DOMAIN,dc=EXT"; ... no Error,
but no results.

After debugging, looks like the filter is removing all the results?
Removed the filter. Still removing results. Commented out the
"PropertiesToLoad"... no luck.

Using the VBS script above, I get 4 admins for Administrators/Builtin.

.



Relevant Pages

  • Re: Enumerate members of Administrators Group (AD)
    ... Get a powerful web, database, application, and email hosting with KJM ... looks like the filter is removing all the results? ... Removed the filter. ... I get 4 admins for Administrators/Builtin. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: need to modify local group membership via VBscript
    ... The script I posted was orginally used to add another domain group ... It only worked if Domain Admins was ... can add domain groups to the local Administrators group. ... how to add a domain group to local administrators account: ...
    (microsoft.public.windows.server.scripting)
  • Re: Move computers account to another OU from a txt list
    ... I need a script, that list from OU or txt file, that contains machine ... user objects by changing the ADO filter in the loop. ... ' Change the base of the query to a specific OU. ... ' Filter on all user objects. ...
    (microsoft.public.windows.server.scripting)
  • Re: need to modify local group membership via VBscript
    ... A logon script runs with the credentials of the user, ... ' Bind to local Administrators group on remote computer. ... Wscript.Echo "Domain Admins already in Administrators on " & strComputer ...
    (microsoft.public.windows.server.scripting)
  • Re: Problem with Javascript with TDC control
    ... The problem is in getting the total after doing a display and then refreshing the TDC (which invokes the script filter()). ... I tried to put similar looping code at the end of filterto examine what I get from the TDC refresh, but I got a messages of "Operation is not allowed when the object is closed". ... The call of a filter is done in a javascript routine with setting the DataURL and doing inquiry.Resetwhere inquiry is the name of the dataset object. ...
    (comp.lang.javascript)