Sign in to follow this  
Followers 0
Javik

Find all AD objects with certain properties / attributes?

2 posts in this topic

Since I see Water is here, I suppose I'll just ask.. :)

Is there a way to find all objects of a certain type in Active Directory, and stick the result into an array?

I have been looking through Water's AD commands (Sept 2011 command set) and I don't see one that looks like it would do this.

Find all objects of type Computer, that do not have property "netbootGUID".

The actual purpose I'll cover in another thread..

Convert not-prestaged WDS-joined computers into managed?

http://social.technet.microsoft.com/Forums/en-US/winserversetup/thread/fc861b02-1ae2-4e46-96fd-84aad31dba29

.

Share this post


Link to post
Share on other sites



The functtion you are looking for is _AD_GetObjectsInOU. There you can pass a LDAP query to select the objects you need and return the properties you need into an array.

The LDAP query should look like:

"(objectCategory=computer)(!netbootGUID=*)"

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0