Re: Query Active directory
Two broad things that may help you are VBSCRIPT & ADSI. You can use both to query & even modify objects in active directory. Unfortunately, I don't have a specific code for you. I've used them to create users and delete them as well with as little as 10 lines of code. All that is needed is the "path" of the object you are inquiring about. So for example, active directory is in a domain named fakedomain.com. It is also on a server pc called server01. The user is in an organizational unit (ou) called myou. You would make references to these in a path like "fso = ou=myou, server01, dc=fakedomain, dc=com". Something like that. It's been a while since I've done it. But anyways, once you are able to set the path to the object you want, then you just query the property of that object for what you're looking for. Again, you'll have to find how to do this by researching vbscript or adsi.