Hi,
I am not sure, this type of query already answered here.
I am trying to extract the log file in the time range (ex: between 9 - 9.30).
I am using the powercli to filter errors in the logs like
$log = get-log -key xxxx -server <hostname>
$log.entries | select-string "Error"
But I would like to know the logs within the time range. As well as if anybody helps to use startlinenum & lastlinenum - it will be useful.
Thanks in advance.
Hi Nava,
You can try using the "Get-VIEvent" cmdlet with Start and Finish parameters. Have a look here:
Good luck.
Regards
Franck
Thanks Franck.
So can't we use startlinenum & lastlinenum in the get-log cmdlet.
There is a parameter in the get-log
Also remember that ESXi uses UTC exclusively.
Yes, you can use the StartLineNum parameter on the Get-Log cmdlet.
There is no LastLineNum parameter but you can use the NumLines parameter combined with StartLineNum to achieve a similar result.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes. Almost I got the answer.