Powershell Get ast 3 Reboots data.

Code below works for the last reboot. I need to get the last 5 Reboots for any particular server but I still need to return the same data for the insert below.



If you want to get the last 5 reboot events then change.



If you want to get the last 5 reboot events then change.



Sound about right. Away from mt testing Computer will try later tonight. Thank you!



Sorry for delay. Running into a few issues.
1. BootTime should be datetime but the assignment is making it a string. Not able to do the arithmetic to calculate uptime.

2. Also $Results.Date is an array I need to pass one value at a time for each reboot instance



Any Updates?



Share this

Related Posts

There was an error in this gadget