rikho Posted August 17, 2009 Share Posted August 17, 2009 Hello everyone, This is my code, anyway when i am checking the whenchanged date or whencreated seem's to be correct. expandcollapse popupFunc go() $strHostServer = 'myserver_name' _ADGetObjectsInOU ($asComputers, $sOU, "(objectClass=computer)", 2, "name,createTimeStamp,modifyTimeStamp") $tt = 15 GUICtrlSetData($Pr3, $tt) GUICtrlSetData($Label4, $asComputers[0][0]) $x = 0 FileOpen($report, 2) For $i = 0 To $asComputers[0][0] GUICtrlSetData($Label2, $i) $whenCreated = $asComputers[$x][1] $whenChanged = $asComputers[$x][2] MsgBox(4096, '$lastlogon_poste', $lastlogon_poste, 1000) $yyyy = StringMid($whenCreated, 1, 4) $mm = StringMid($whenCreated, 5, 2) $dd = StringMid($whenCreated, 7, 2) $sNewDate1 = $dd & '/' & $mm & '/' & $yyyy $yyyy2 = StringMid($whenChanged, 1, 4) $mm2 = StringMid($whenChanged, 5, 2) $dd2 = StringMid($whenChanged, 7, 2) $sNewDate2 = $dd2 & '/' & $mm2 & '/' & $yyyy2 $x = $x + 1 $lastlogon_computer = $dd3 & '/' & $mm3 & '/' & $yyyy3 FileWriteLine($report, $asComputers[$x][0] & ';' & $sNewDate1 & ';' & $sNewDate2 & @CRLF) $tt = $tt + 1 $P3 = ($tt * 100) / ($asComputers[0][0]) GUICtrlSetData($Pr3, $P3) Next FileClose($report) EndFunc is someone got a better code to get lastlogin domain computer (and not user) Regards. Link to comment Share on other sites More sharing options...
rikho Posted August 19, 2009 Author Share Posted August 19, 2009 Need Guru help please >_ Link to comment Share on other sites More sharing options...
water Posted December 6, 2009 Share Posted December 6, 2009 (edited) I'm a bit late. To get the last login date you could use the function _AD_GetLastLoginDate from the rewritten Active Directory UDF. Edited December 6, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now