How to use VBS to search AD from webpage?

Discussion in 'ASP .Net Web Services' started by Björn Johasson, Feb 15, 2004.

  1. 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
     
    Björn Johasson, Feb 15, 2004
    #1
    1. Advertising

  2. Björn Johasson

    Jan Tielens Guest

    I suggest you post this question in the ASP.NET newsgroup, this one is for
    Web Services...

    --
    Greetz

    Jan Tielens
    ________________________________
    Read my weblog: http://weblogs.asp.net/jan


    "Björn Johasson" <bjorn at johansson dot gee ess> wrote in message
    news:#fxOEF$...
    > 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
    >
    >
     
    Jan Tielens, Feb 16, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    445
  2. Paul
    Replies:
    14
    Views:
    869
    Alexey Smirnov
    Jun 19, 2008
  3. Alexey Smirnov

    Re: Can I use asp.net editor to create a vbs?

    Alexey Smirnov, Nov 20, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    344
    Alexey Smirnov
    Nov 30, 2009
  4. Abby Lee
    Replies:
    5
    Views:
    443
    Abby Lee
    Aug 2, 2004
  5. Replies:
    1
    Views:
    129
    Joe Reynolds
    Sep 28, 2006
Loading...

Share This Page