Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
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.
'AddSpridenID.vbs 'Written by Jason Loomans 'This script will take the iSeries student ID on an account, find the corresponding AD account, and add the SPRIDEN ID to the AD account. 'Variables Dim objFSO, arrStr, User strInputFile = WScript.Arguments.Item(0) strOutputFile = WScript.Arguments.Item(1) Const StaffOU = ",<ldappathhere>" Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 'strMsgboxVerify = MsgBox("You are about to add the Banner SPRIDEN ID to all accounts in Active Directory. Continue?",20,"VBScript") 'If strMsgboxVerify = 7 Then ' Wscript.Echo("Script terminated") ' Wscript.Quit(1) ' End if 'Create new data file Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") Set OutFile = objFSO.CreatetextFile(strOutputFile, True) OutFile.WriteLine "Action,Type,Name,EmailAddress,ForceChangePassword,Password,DisplayName,FirstName,LastName" OutFile.Close Set OutFile1 = objFSO.OpenTextFile(strOutputFile,ForAppending,True) 'Open Banner Extract, read SAMAccountName, retrieve, and write correct info to new file. Set objDataFile = objFSO.OpenTextFile(strInputFile,ForReading) On Error Resume Next Do until objDataFile.AtEndofStream arrStr = Split(objDataFile.ReadLine,",") strSAMAcctName = arrStr(2) strEmailAddress = arrStr(3) strDisplayName = arrStr(6) strFirstName = arrStr(7) strLastName = arrStr(8) Set User = GetObject ("LDAP://CN=" & strSAMAcctName & StudentOU) Password = Left(User.Lastname,3) & Right(User.adminDisplayName,5) Password = Ucase(Password) PasswordA = Left(User.Lastname,3) & User.physicalDeliveryOfficeName PasswordA = Ucase(PasswordA) OutFile1.WriteLine "Update,Mailbox," & strSAMAcctName & "," & strEmailAddress & ",1," & PasswordA & "," & strDisplayName & "," & strFirstName & "," & strLastName Loop objDataFile.Close OutFile1.Close 'Delete original file and rename new file to original name objFSO.DeleteFile strInputFile objFSO.MoveFile strOutputFile, strInputFile set objFSO = nothing 'strMsgboxEnd = Msgbox("Finished! Terminating script.",64,"VBScript")
Join the community of 500,000 technology professionals and ask your questions.