# Facts

Facts: Your Computer's Facts: \`Get-CimInstance\`, Event Logs: Why Did It Restart?.

Updated: November 10, 2026

1. [Your Computer's Facts: \`Get-CimInstance\`](https://www.ask-codey.com/lessons/powershell-cim) (Journeyman): Get-CimInstance asks Windows' own catalog of facts about the computer, one class at a time, such as Win32_OperatingSystem for the Windows version and the last restart, Win32_LogicalDisk for the disks and Win32_Battery for the battery, and a calculated property turns its bytes into gigabytes.
2. [Event Logs: Why Did It Restart?](https://www.ask-codey.com/lessons/powershell-event-logs) (Journeyman): Windows writes what happens to it in event logs, and Get-WinEvent -FilterHashtable finds the events you want by log, event ID, level and start time, so the five restart IDs, 41, 1074, 6005, 6006 and 6008, tell a planned restart from a crash or a power cut.

Source: https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-facts
