strCSVPath = InputBox("Please enter in the full path to your CSV (PLEASE INCLUDE THE END SLASH \)") strCSVName = InputBox("Please Enter in the FileName") strOU = InputBox("Please Enter in the destination OU (FORMAT: OU=,OU=") set csvInputConn = createobject("ADODB.connection") set csvInputRS = createobject("ADODB.recordset") csvInputConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strCSVPath & ";" & "Extended Properties=""text;HDR=NO;FMT=Delimited""" csvInputRS.open "SELECT * FROM " & strCSVName,csvInputConn Set RootLDAP = GetObject("LDAP://rootDSE") Set ADLocation = GetObject("LDAP://" & strOU & "," & RootLDAP.Get("defaultNamingContext")) do until csvInputRS.EOF On Error Resume Next strFirstName = csvInputRS.Fields.Item(0).value strSurName = csvInputRS.Fields.Item(1).value strSam = csvInputRS.Fields.Item(2).value strDisplayName = csvInputRS.Fields.Item(3).value strPassword = csvInputRS.Fields.Item(4).value strUPN = csvInputRS.Fields.Item(5).value Set strUser = ADLocation.Create("User","cn=" & strSam) strUser.put "sAMAccountName",strSam strUser.put "givenName",strFirstName strUser.put "sn",strSurname strUser.put "UserPrincipalName",strUPN strUser.put "DisplayName",strDisplayName strUser.put "name",strDisplayName strUser.put "mail",strUPN strUser.SetInfo strUser.SetPassword sPassword strUser.Put "userAccountControl", 512 strUser.SetInfo csvInputRS.movenext Loop WScript.Echo "Script Completed - Hit F5 in the OU that you selected" WScript.Quit