Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
dim objRecordSet dim objConnection dim objCommand dim user dim strUser dim strUserList Set objFSO = CreateObject("Scripting.FileSystemObject") '======== Get User ID user= InputBox("Enter the ID you want to check","Enter User ID") '======== Set up ADODB Connection Set objConnection = CreateObject("ADODB.Connection") objConnection.Provider = "ADsDSOObject" objConnection.Open "LDAP Provider;" Set objCommand = CreateObject("ADODB.Command") Set objCommand.ActiveConnection = objConnection '======== Query LDAP Titleinfo = getTitle(user) '======== Function to query LDAP and get the title info. Function getTitle (userid) objCommand.CommandText = "SELECT TITLE FROM 'LDAP://ldapapi/ou=people,o=my domain' WHERE unixid='" & userid & "'" Set objRecordSet = objCommand.Execute On Error Resume Next While Not objRecordSet.EOF For Each i in objRecordSet.fields For Each v in i.value WScript.Echo(v) 'the info I need Next Next objRecordSet.MoveNext Wend objConnection.close End Function wscript.quit
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.