patron
asked on
Script to check last reboot date-time with credentials used to reboot
Please help to share power shell script To check last reboot for windows servers (mentioned in server list ) with user id used for reboot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
I have a Get-WinEvent script that I use to see how long a user's computer is locked and I figure I can do something similar for your request.
I first gather all the computer in my environment using the Get-ADComputer and then for each computer I run Get-WinEvent and story it in an array.
Open in new window
I took some info from these two sites and put together the script.
https://prajwaldesai.com/restarted-windows-server/
https://stackoverflow.com/questions/17155311/get-username-from-get-winevent