VB / ADSI Prompt User for OU.
I am creating an HTML document for My company's IT maintenance. On this page, will be several vbscripts that will perform various inventory and data collection tasks. The data will be collected on a 'per OU' basis. I have a working script which binds to a specific OU, however I would like to be able to prompt the user to type an OU name and have the script run against that OU. Here is a piece of the code:
Set objOU = GetObject("LDAP://ou=MY OU,dc=MY DC,dc=com")
objOU.Filter = Array("Computer")
For Each objComputer in objOU
strComputer = objComputer.CN
Set objShell = CreateObject("WScript.Shell")
strCommand = "%comspec% /c ping -n 3 -w 1000 " & strComputer & ""
Set objExecObject = objShell.Exec(strCommand)
Do While Not objExecObject.StdOut.AtEndOfStream
strText = objExecObject.StdOut.ReadAll()
If Instr(strText, "Reply") > 0 Then
I have a Dim statement that will prompt, however I cannot get the variable into the LDAP statement. This has been tearing at me for over a week.
Any help would be graciously appreciated.
Last edited by ScriptRookie; 08-26-2005 at 09:10 AM.
By vbdude in forum VB Classic
Last Post: 07-18-2007, 10:22 AM
Last Post: 08-30-2001, 11:45 AM
By Todd in forum Enterprise
Last Post: 07-17-2001, 08:26 AM
By tami in forum VB Classic
Last Post: 01-09-2001, 02:00 PM
By Ken McLean in forum authorevents.vaughn
Last Post: 05-30-2000, 09:25 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL