How to check when the Windows server crashed?

Open Event Viewer on your Windows server.
On the Event Viewer window, expand the drop-down on the left menu for Windows Logs and select System. Then on the right menu click Filter Current Log.
On the Filter Current Log window, check the boxes for Critical, Warning, and Information. For the event ID, enter 6005 and click OK.
Now you will see the logs for all events with event ID 6005, you can click them and read the description and details of each event to find the reason for the unexpected crash.