That's pretty good but the only results it will return is if the second domain has a SamAccountName with all upper or all lower case letters. If there is a mix of Upper and Lower case letters, no value is returned.
I need to convert both the sAMAccountName value & the string strSamAccountName...
I know how to use it.
It doesn't work inside string I'm using to query. If the case of sAMAccountName was the same as the string strSamAccountName it would be fine but because its matching directly from an SQL LDAP lookup and sAMAccountName is not defined, it doesn't seem to work
"SELECT...
In the script, only one record set has a string defined. The other is pulling the information directly from the SQL statement which is selecting the data
Thanks for your help
One Problem. The Case is different on other domains
Need to compare all in UpperCase or LowerCase to get a proper result.
Tried using Upper and Ucase but no values are being returned
Thanks
usereobkect is an example of what I am looking for. I know the attribute names. The connection to the LDAP Directory is not working. It's not Active Directory, its eDirectory.
Trying to connect to LDAP server using a vbscript to pull information out
This is what I have. Get error when get to recordset
Error = line 24
either BOF or EOF is True, or the current record has been deleted. Requester operation requires a current record
Const ADS_SCOPE_SUBTREE = 2...
I want to query 2 different recordsets for matching values and I don't know how to. I need to run down through one set of records and search the second set of records for matching values
This is what I have so far
On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
Const ForReading = 1
Const...
It seems to work now. just changed below line
If objSubFolder.DateLastModified < DateValue(Now() - intDaysOld) Then
WScript.Echo objSubFolder.DateLastModified
objSubFolder.Delete True
End If
Thanks so much for your help
WScript.Echo objSubFolder.DateLastModified
When I take comment away from above, I get the correct date and time
No Echo appears with the below statement
WScript.Echo objSubFolder.DateLastModified
I've also tried this but can't get it working
Any help much appreciated
NumberOfDaysOld = 0
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFolders = objWMIService.ExecQuery _
("SELECT * FROM...
I'm not a programmer .... Technical User. I found the below script to delete files after 30 days. I hope the script will delete a folder and all its contents based on modified date
Can anyone help
Just want to delete a folder in a directory and subfolders based on modified date
It doesn't...
I'm not a programmer .... Technical User. I found the below script to delete files after 30 days. I hope the script will delete a folder and all its contents based on modified date
NumberOfDaysOld = 30
strPath = "C:\Test"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder =...
Thanks for your help
Should this work? I trying to get it to delete all folder in directory so number of days = 0
If I get that working I will change number of days
Dim NumberOfDaysold, objFSO, StrPath, objFolder
NumberOfDaysOld = 0
strPath = "C:\Temp"
Set objFSO =...
I'm not a programmer .... Technical User. I found the below script to delete files after 30 days. Does this sit in side a .VBS file or something. I hope the script will delete a folder and all its contents based on modified date
NumberOfDaysOld = 30
strPath = "C:\Test"
Set objFSO =...
What to delete the folder & contents based on how old the folder is .... I.e Last modified
Trying to use this command but can't use the /y tag for the Del part of the command in the statement
FORFILES -p C:\Backup\gpo_backups\ -d 100 -c "CMD /C IF @ISDIR==True Del @File"
The statement is for...
It is important to have your enviorment controlled. A server room can generate alot of heat and for that reason alone, the room needs to be kept at the right temp. I presume that there is air conditioning in that room and with the door open, you can no longer condition the air.
I'm logged in as administrator so I have full admin rights. I think that there is an issue with parts of the application that I am trying to install as windows security setting is to high. I had a similar issue on an XP pro machine because SP2 was installed. When I removed XP2, the security...
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.