Ok...I am familiar with vbscript. What I am doing is exporting members of a group from AD. I am using "ldifde.exe" to export the users to a .ldf file, because thats that only way ldifde can do it that I have found. It then uses the modify script to open the .ldf files, sort out all the crap...
It runs this after the ldife command which exports it:
objShell.Run("%comspec% /c cscript Modify.vbs > ""Users.txt"""), 0, True
Do you know how to change it to lastname, firtname?
Sorry here is the top half of the code that I didn't paste in right:
Dim objFileSystem, objInputFile
Dim strOutputFile, inputData, strData, strTemp
Const OPEN_FILE_FOR_READING = 1
' generate a filename base on the script name, here readfile.in
strOutputFile = "groups.ldf"
Because it's using "ldifde" to export the users...it exports using "ldifde" and then uses modify.vbs to sort out the names in the "ldf" file that "ldifde" generates. Here is the full modifying code:
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objInputFile =...
I have a script that reads from a file, and sorts the data out into a text file. Here is the format it reads from:
CN=Lastname\, Firstname,OU=Users,OU=sports group,DC=domain,DC=name, DC=com
This code will read the data and put it into a text file:
if Mid(strData,1,2)=" C" then...
Yeah but thats only for the first row, which is the contact name...so if there are no more contacts the the script stops...makes sense to me. Anyway...I've messed around with this and gotten most of it to work.
This works for blanks cells you might have, other than first cell which will be the...
I need a little help with this script...it seems that if a cell is blank, it error's out and stops the script. Also, if the contact already exists it errors out...does anyone know how to fix this?
Option Explicit
Dim objRootLDAP, objContainer, objContact, objExcel, objSheet
Dim strOU...
Ahh ok I understand now....would it be like this?
Do While Ping(strHost) = False
WScript.Sleep 1000
Loop
if Ping(strHost) = False then
Wscript.Echo "Host " & strHost & " is now shutdown!"
Else
end if
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.