Author Posts

January 1, 2012 at 12:00 am

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