NickyPower
asked on
Last Login Script
I want an interactive script to check the last time a user logged onto ACtive Directory... The result should give me their name, last logon time & date... If the script is not interactive, give me the output in a text file format... with the details username, last logon time & date!....
note, I have never used Windows Scripting before....
note, I have never used Windows Scripting before....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hey Rob,
Bit curious about your Ping function (if you don't mind me being nosy :))
Doesn't the Return Code you have here:
If boolCode = 0 Then
GetPingInfo = "Success"
Else
GetPingInfo = "Failure"
End If
Only return 0 if the command fails to execute rather than checking the return from ping? That is, it could successfully execute, but return "No Reply"?
Chris
Hey Chris,
Not from my testing.....from any test that I have run, it *only* returns zero if it gets a reply.
Even if it can resolve the host name but still times out, it returns 1.
If you can find a test case where this is not the case *please* let me know, because otherwise I've been leading a few people "down the garden path" :-o
Regards,
Rob.
Not from my testing.....from any test that I have run, it *only* returns zero if it gets a reply.
Even if it can resolve the host name but still times out, it returns 1.
If you can find a test case where this is not the case *please* let me know, because otherwise I've been leading a few people "down the garden path" :-o
Regards,
Rob.
Nice, I like that one, simplifies my version somewhat :)
Chris
ASKER
apologies to the delay...
Thanks for the grade.
Regards,
Rob.
Regards,
Rob.
It will give you the full list with all the info you need.