You can convert lastlogontimestamp to readable date format using W32TM command
Syntax:
w32tm /ntte (lastLogon attribute value)
Example:
C:\>w32tm /ntte 127281844863301000
147316 22:48:06.3301000 - 5/5/2004 4:18:06 AM (local time)
It's very difficult to use this command for bulk extract, we can convert this in Excel itself using below procedure.
You can use below formula to convert UTC format to normal readable format in Excel.
=IF(A1>0, DATE(1601,1,1) +A1 /600000000/1440,"")
A1 is the cell that contains the Timestamp.
Yes, in Excel itself you can convert lastlogon and lastlogontimestamp to a normal readable format no need for additional script and command, we can use this simple procedure to extract lastlogon timestamp from active directory without using a script, more about CSVDE
No comments:
Post a Comment
If you have any question please let me know