How to use VBS to search AD from webpage?

B

Björn Johasson

Hi,

I've made some VBscripts that searches Active Directory and I wish to make
some kind webinterface so our intranet users can use it. The problem is that
I have no asp experience. I searched around msdn etc. without finding any
good examples how to run the scripts from a webpage.

See bottom for a example script that is similar to mine.

Thanks,

BJ

-------------
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Provider=ADsDSOObject;"

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection

objCommand.CommandText = _
"<LDAP://dc=NA,dc=fabrikam,dc=com>;;name;subtree"
Set objRecordSet = objCommand.Execute

While Not objRecordSet.EOF
Wscript.Echo objRecordSet.Fields("name")
objRecordSet.MoveNext
Wend

objConnection.Close
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top