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?by Nidhin CK at 2012-12-27 15:20:08
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"
sorry guys… it is working fine with below commandby RichardSiddaway at 2013-01-03 10:33:00
$sheet1.cells.item($rowno,1) = ([DateTime]]::Parse($User.lastLogonTimestamp)))
You may find it quicker to create a CSV and import it into Excel