MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Option Explicit 'On Error Resume Next Dim objConnection, objCommand, objRecordSet Dim FindUser, strUser, strDN, arrPath, intLength, intNameLength Const ADS_SCOPE_SUBTREE = 2 Const intForReading = 1 Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection FindUser = InputBox("Please Enter A UserName", "Find User OU") If FindUser = "" Then MsgBox("No UserName Was Added") WScript.Quit Else strUser = FindUser End If objCommand.Properties("Page Size") = 1000 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE objCommand.CommandText = _ "SELECT distinguishedName FROM 'LDAP://dc=domain.com,dc=com'WHERE objectCategory='user'AND sAMAccountName='" & strUser & "'" Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF strDN = objRecordSet.Fields("distinguishedName").Value arrPath = Split(strDN, ",") intLength = Len(arrPath(1)) intNameLength = intLength - 3 Wscript.Echo "User :" & strUser & Right(arrPath(1), intNameLength) objRecordSet.MoveNext Loop
|VB script to get count(number) of files present in the URL based on the Last modified date||11||63|
|VB script: Files verification based on last date modified and prefix with loop number and pause param v2||10||37|
|vbscript to installing all steps of softwares automatically||7||20|
|Button function on table is in trouble||3||20|