# WinDiagnostics A dependency-free, non-GUI Windows diagnostics and maintenance-information collector written in PowerShell. `WindowsMaintenanceReport.ps1` collects useful system, hardware, software, startup, storage, networking, security, and maintenance information into a text report. No Python, third-party modules, or installation is required. ## Quick Start ### Run directly from the repository From **PowerShell**: ```powershell irm 'https://proxy.dandaedre.com/gitea/Dandaedre/WinDiagnostics/raw/branch/main/WindowsMaintenanceReport.ps1' | iex ``` This downloads the current version of the script into memory and executes it. Nothing needs to be manually downloaded or installed. For the most complete report, run PowerShell **as Administrator**. ### Run from Command Prompt The script can also be launched directly from `cmd.exe`: ```cmd powershell.exe -NoProfile -Command "irm 'https://proxy.dandaedre.com/gitea/Dandaedre/WinDiagnostics/raw/branch/main/WindowsMaintenanceReport.ps1' | iex" ``` ## Running With Parameters The script supports command-line parameters such as: * `-OutputDirectory` * `-EventLogDays` * `-MaxEventErrors` When parameters are required, create a PowerShell script block from the downloaded script: ```powershell & ([scriptblock]::Create((irm 'https://proxy.dandaedre.com/gitea/Dandaedre/WinDiagnostics/raw/branch/main/WindowsMaintenanceReport.ps1'))) -EventLogDays 30 ``` For example: ```powershell & ([scriptblock]::Create((irm 'https://proxy.dandaedre.com/gitea/Dandaedre/WinDiagnostics/raw/branch/main/WindowsMaintenanceReport.ps1'))) -EventLogDays 30 -MaxEventErrors 250 ``` To save the resulting report in a specific directory: ```powershell & ([scriptblock]::Create((irm 'https://proxy.dandaedre.com/gitea/Dandaedre/WinDiagnostics/raw/branch/main/WindowsMaintenanceReport.ps1'))) -OutputDirectory 'C:\Temp' ``` ## Local Usage You can also download or clone the repository and run the script normally: ```powershell .\WindowsMaintenanceReport.ps1 ``` If the local PowerShell execution policy prevents the script from running: ```cmd powershell.exe -NoProfile -ExecutionPolicy Bypass -File WindowsMaintenanceReport.ps1 ``` The `-ExecutionPolicy Bypass` option applies to that PowerShell process only. It does not permanently change the machine's configured execution policy. ## What It Collects The report includes information such as: * Windows version, build and installation information * System uptime * Manufacturer and computer model * BIOS information * CPU * Physical memory modules * Motherboard * GPU/display adapters * Logical disks and available space * Physical disks * Available disk-health and reliability information * Installed desktop applications * Microsoft Store/AppX packages * Startup programs * Startup registry entries * Startup folders * Automatic Windows services * Automatic services that are not running * Devices reporting problems * Installed signed drivers * Installed Windows updates/hotfixes * Microsoft Defender status * Windows Firewall profiles * Network adapters * IP configuration * DNS configuration * Listening TCP ports * Active power plan * Battery information * Non-Microsoft scheduled tasks * Processes using the most memory * Recent System event-log errors * Recent Application event-log errors * Windows component-store health * System-file verification status ## Output By default, the report is created in the current directory. The filename contains the computer name and timestamp: ```text windows_system_report_COMPUTERNAME_YYYYMMDD_HHMMSS.txt ``` For example: ```text windows_system_report_DESKTOP01_20260904_114500.txt ``` ## Read-Only Diagnostics WinDiagnostics is intended to gather information, not modify the machine. The script does **not**: * uninstall applications * disable startup programs * start or stop services * modify registry values * install Windows updates * delete temporary files * modify networking * change Windows Defender settings * change Firewall settings * automatically repair Windows The maintenance commands used by the script are diagnostic: ```cmd DISM.exe /Online /Cleanup-Image /CheckHealth ``` and: ```cmd sfc.exe /verifyonly ``` The script deliberately does not automatically execute repair operations such as: ```cmd DISM.exe /Online /Cleanup-Image /RestoreHealth ``` or: ```cmd sfc.exe /scannow ``` ## Running Remote Scripts Safely The short command: ```powershell irm 'URL' | iex ``` is convenient, but it also means that PowerShell executes whatever content the server returns at that URL. Only use this technique with a repository and server that you trust. If you want to inspect the script before executing it, download it first: ```powershell irm 'https://proxy.dandaedre.com/gitea/Dandaedre/WinDiagnostics/raw/branch/main/WindowsMaintenanceReport.ps1' -OutFile '.\WindowsMaintenanceReport.ps1' ``` Then inspect it: ```powershell notepad .\WindowsMaintenanceReport.ps1 ``` and run it afterward: ```powershell .\WindowsMaintenanceReport.ps1 ``` For higher-assurance deployments, consider pinning the download URL to a specific repository commit rather than executing whatever happens to be on the `main` branch. ## Privacy The generated report can contain potentially sensitive machine information, including: * computer and Windows user names * hardware serial numbers * installed software * running processes * scheduled tasks * network interface information * MAC addresses * local IP configuration * DNS servers * event-log messages Review the generated report before publishing it or sending it to another person. ## Requirements * Windows 10 or Windows 11 * Windows PowerShell * Internet access when running directly from the repository No additional dependencies are required.