Skip to content

With this setup, the script will check for all unexpected shutdowns over the last 20 days, include verbose error logging if enabled, and handle both logging and output in a structured, user-friendly way. The batch file and `.gitignore` configuration help keep the setup clean and portable.

License

Notifications You must be signed in to change notification settings

TheJesper/unexpected-restart-fighter

Repository files navigation

Writing the updated README content to a file so the user can download it.

readme_content = """

Unexpected Restart Fighter

A PowerShell script designed to diagnose and log unexpected shutdowns, restarts, and crashes on Windows systems. This script tracks recent shutdown events and logs critical errors leading up to these events to help identify potential hardware or software issues.

Features

  • Tracks recent unexpected shutdown and restart events in the last 20 days.
  • Identifies errors and critical issues leading up to the last few minutes before each shutdown event.
  • Provides a summary of hardware-related errors for easier diagnosis.
  • Optionally shows additional error details with the -Verbose flag.
  • Simple -Help option for guidance on usage.

Usage

Running the Script

Run the script from PowerShell:

.\unexpected-restart-fighter.ps1 [-Verbose] [-Help]

About

With this setup, the script will check for all unexpected shutdowns over the last 20 days, include verbose error logging if enabled, and handle both logging and output in a structured, user-friendly way. The batch file and `.gitignore` configuration help keep the setup clean and portable.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published