Jump to content

richietheprogrammer

Active Members
  • Posts

    153
  • Joined

  • Last visited

Everything posted by richietheprogrammer

  1. Thanks!!! I feel dumb for that. It is taking quite a while to complete. I assume theres no way around that?
  2. My script: #include <ad.au3> _AD_GetLastLoginDate("johnsmith")
  3. It sounds like it is what Im looking for. When I try to run it I receive "... ==> Variable must be of type "Object".:" It looks to be failing here: $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_DNSDomain & ">;(" & $sAD_Property & "=" & $sAD_Object & ");ADsPath;subtree" Ideas? Thanks a lot for your help by the way!!
  4. I do mean Domain Controller. I believe I have heard of a tool in the past (possibly a Windows tool?) that retreives a list of Domain Controllers a user has logged in to recently. So this wouldnt be something easily doable using the AD UDF?
  5. I will have to look into that. Alternatively, is it possible to get a log of all the servers a user has logged in to over some time, or is that the same type of deal?
  6. Oh I see. I actually do use Altiris (web version). Anyway I can script Altiris for quick usage that you can think of?
  7. Dictator, I think that would do the opposite of what Im looking for. What you suggested is a way to find the users logged in to a specific machine. Im looking to a log of machines a user has logged in to.
  8. Do you mean a script would have to run on the user's computer? I think theres a way to do what Im looking for using the AD GUI. What you're suggesting wouldnt work since I don't have the computer information.
  9. Hey all, back with some more AD questions. Is it possible to return machine info (computer name) given a username? Id like to know what computer a specific user is logged in to (and maybe a little history of when they last logged in to which computer), and Im thinking my best odds are using the AD UDF? Thanks for any help!!
  10. I see what you are saying. I am looking for a script that plays automated greeting. I cannot script the VOIP software that we use. I guess I had thought that it would be possible to set the input that the microphone takes to be a digital sound file, instead of me talking.
  11. I use a headset so I cannot play the track and hope that my mic picks it up. Is there no way to send something to the microphone? No protocol? Thanks!
  12. Thanks for your reply. Basically I answer phone calls using my computer (VOIP), and I say the same sentence very frequently. I want to record my voice and have it automatically play over the microphone when I run the function (code).
  13. Hey all, I was wondering if there is a way to "automate" the microphone in an output way. Meaning, is there a way to write a function that will force a track to be played and sent to the microphone? Basically, instead of having to say a specific thing on the microphone over and over again, is there a way to automate the microphone to send a recorded track? Not sure if what Im asking makes sense, but any help would be greatly appreciated!
  14. You,sir,are awesome! One last thing. Right now $sSearch accepts Lastname,"space"+Firstname. The input will be in the format Lastname,Firstname without a space. Any idea on how to escape that properly?
  15. I apologize it's been a long day. Running GetObjectProperties example 1, to answer your question, cn (in col0) looks perfect as the value (in col1) has Lastname,firstname. So I need to input that and I want the script to return the username which shows up as the propertyname "mailNickname" in Col0. Are we on the same page now? Sorry again!
  16. Ahhh okay. Well I tried simplifying the process a little. When I compile and run your script, "AD_GetObjectsInOU" without touching it, Examples 1 and 2 return "No OUs could be found". Example 3 is the only one that shows an _ArrayDisplay with the results I posted earlier. Any ideas why the first 2 examples return an error? Appreciate all your help here!
  17. Col0 is returning exactly "Smithj", my actual username. It's not returning the name of the property. It is returning the value of the property.. weird?
  18. Assuming my name is John Smith. Col 0 returns: Smithj Col 1 returns: CN=Smith, John,OU=USA,OU=California,OU=Company,OU=Domain Users,DC=us,DC=abc So the property CN contains both the first and the last name. So I need to be able to input CN (as Smith,John) and have it return the Col0 value.
  19. When I ran the first example, it returned mylastname,myfirstname in Col2 and my username in Col0. What I need to do is be able to input the information shown here in Col 2 and I want the script to return the corresponding username (which is shown now in Col0). I want the script to work given somebody else's Last,First name instead of mine. Somebody else on the network. Am I making any sense?
  20. Thank you for your reply. I just included the whole AD_GetObjectsInOU instead of using _AD_Open. I need to have it accept a variable formatted as LastName,FirstName and retreive the username for that user. The usernames are not based on the names consistently as they have to match a certain length so Smith,John might be Smitj. Ideas? Thanks again!!
  21. Thank you for the reply and for your hard work. I cant get it to work though, what am I doing wrong? Global $sGivenName = _AD_GetObjectAttribute(@UserName, "Surname") $aObjects = _AD_GetObjectsInOU("", "(ANR=" & $sGivenName & ")", 2, "sAMAccountName,distinguishedName,displayname", "displayname") If @error > 0 Then MsgBox(64, "Active Directory Functions - Example 3", "No objects found") Else _ArrayDisplay($aObjects, "Active Directory Functions - Example 3 - Ambigous Name Resolution. Search for '" & $sGivenName & "'") EndIf this is not returning any results. Thanks again!
  22. Hey all, Been doing some work with AD. I am able to return specific info given a username. However, I want the input to accept a format of "LastName,FirstName", search AD for a match and return the username. Is this possible? Thank you very much for any help!
  23. If it were negating the success, then the msgbox would show. Nothing is happening. The first file is deleted but the script hangs and no more files are deleted.
  24. Hmm. Runwait doesnt seem to want to work. It executes the command, I check and the filed is deleted, but it doesnt execute the next one. Any ideas? By the way, the del command is just a test command, I have to use the command prompt for my script. Thanks! For $Index = 1 To $Files[0] $iReturnValue = Runwait(@ComSpec & ' /k Del "'&$sDir & '' & $Files[$Index]& '"', '', @SW_hide) If $iReturnValue <> 0 Then Exit MsgBox(16, "Error", "....") Next My goal is to have 1 cmd open that executes the files consecutively in that 1 window.
×
×
  • Create New...