Storing lastlogontimestamp in to excelsheet

This topic contains 0 replies, has 1 voice, and was last updated by Profile photo of Forums Archives Forums Archives 5 years, 5 months ago.

  • Author
    Posts
  • #6244

    by Nidhin CK at 2012-12-27 14:28:37

    Hi Experts – I'm trying to export lastlogontimestamp to excelsheet.. Could you please help me on this?

    I'm using bellow command to store the lastlogontimestamp in to excelsheet.
    $sheet1.cells.item($rowno,1) = [DateTime]]::Parse($lastLogonTimestamp))

    below command is working fine but it is not giving the details in user readable format. for eg lastlogontime is showing like 1.30004E+17
    $sheet1.cells.item($rowno,1) = $user.lastLogonTimestamp -Join "`n"

    by Nidhin CK at 2012-12-27 15:20:08

    sorry guys.. it is working fine with below command
    $sheet1.cells.item($rowno,1) = ([DateTime]]::Parse($User.lastLogonTimestamp)))

    by RichardSiddaway at 2013-01-03 10:33:00

    You may find it quicker to create a CSV and import it into Excel

You must be logged in to reply to this topic.