Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

Not sure what you have in $lastLine.LastLine, but assuming it is the last line fo the vmkernel log, can you try casting with DateTime?
You do not have to drop the 'Z' at the end, rather split on the blank.

$lastDateTime = [DateTime]($lastLine.LastLine.Split(' ')[0])

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos