WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Get Computer Names

Question:

Looking to export all the computer names within the AD. Would like to be able to get version info as well.

Answer:

There are several ways to query AD using WinBatch. One is to use ADO COM objects vie WinBatch OLE functions. Another it to use the ADSI extender's dsFindPath function to get a list of ADSI paths to all the compute objects in the DS. For example,
; Get all the computers in a domain.
AddExtender("wwads34i.dll")
sPath = "LDAP://mydomain"
sFilter = "(objectCategory=computer)"
sResult = dsFindPath(sPath, sFilter )
Message("Search result for ""%sFilter%""", sResult)
If you want to use ADO, search the tech support database on ADO and you will find several examples.
Article ID:   W15813
File Created: 2004:03:30:15:40:58
Last Updated: 2004:03:30:15:40:58