Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Test-Win11Compatibility

Test-Win11Compatibility is a PowerShell script that evaluates a Windows system's readiness for Windows 11. It checks hardware (CPU, RAM, storage), firmware (TPM 2.0, Secure Boot), and software requirements, providing a detailed report with pass/fail indicators and remediation advice. Ideal for IT administrators and users planning a Windows 11 upgrade, this script is part of the Test-Win11Compatibility repository.

Features

  • Validates CPU (generation/cores), TPM 2.0, Secure Boot, RAM (≥4GB), and storage (≥64GB).
  • Confirms UEFI firmware and DirectX 12/WDDM 2.0 graphics compatibility.
  • Advises on Microsoft Account requirements (optional in some cases).
  • Outputs a color-coded console report with detailed explanations.
  • Optionally exports results to CSV, XML, or JSON files, or generates an HTML report.
  • Non-invasive, read-only checks with no system modifications.

Requirements

  • PowerShell Version: 5.1 or later (PowerShell 7.x recommended).
  • Operating System: Windows 10 (version 2004+) or Windows 11, x64 architecture.
  • Modules: None; uses built-in cmdlets (Get-CimInstance, Get-WmiObject, dism, Get-ComputerInfo).
  • Permissions: Standard user for most checks; Administrator for full TPM/Secure Boot access unless -NoElevation is used.
  • Dependencies: .NET Framework 4.8 or later (included in supported Windows versions).

Installation

  1. Clone the Repository:

    git clone https://github.com/ndomako/Test-Win11Compatibility.git
    cd Test-Win11Compatibility
  2. Download the Script:

  3. Set Execution Policy (if needed):

    • Run as Administrator:
      Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Usage Examples

  1. Console Report: Display compatibility results in PowerShell:

    .\Test-Win11Compatibility.ps1
    • Shows a formatted report with ✅ Pass, ❌ Fail, or ⚠️ Warning for each requirement.
  2. Export to JSON: Save results to a JSON file for analysis:

    .\Test-Win11Compatibility.ps1 -ExportResults -ExportFormat JSON -ExportPath "C:\Reports\Win11Report.json"
    • Generates a JSON file with requirement details and recommendations.
  3. Generate HTML Report: Create an HTML report for sharing:

    .\Test-Win11Compatibility.ps1 -ExportHTML -ExportPath "C:\Reports\Win11Report.html"

Parameters

  • -DriveLetter (Optional, String):

    • Description: Specifies the drive letter to check for storage requirements (e.g., available disk space). Must be a single uppercase letter (A-Z).
    • Expected Type: System.String (e.g., "C").
    • Default: "C".
    • Example: -DriveLetter D.
  • -ExportResults (Optional, Switch):

    • Description: Enables exporting the compatibility results to a file in the format specified by -ExportFormat.
    • Expected Type: SwitchParameter (no value needed).
    • Default: False (no export).
    • Example: -ExportResults.
  • -ExportFormat (Optional, String):

    • Description: Specifies the file format for exported results when -ExportResults is used. Valid options are XML, JSON, or CSV.
    • Expected Type: System.String (must be "XML", "JSON", or "CSV").
    • Default: "XML".
    • Example: -ExportFormat CSV.
  • -ExportPath (Optional, String):

    • Description: Specifies the file path or directory to save the exported results. If a directory is provided, the script generates a filename with a timestamp (e.g., Win11Report_2025-10-20.xml). If a file path is provided, it uses the specified filename.
    • Expected Type: System.String (e.g., "C:\Reports\Win11Report.csv" or "C:\Reports\").
    • Default: ".\" (current directory).
    • Example: -ExportPath "C:\Reports\report.json".
  • -ExportHTML (Optional, Switch):

    • Description: Generates an HTML report of the compatibility results, saved to the path specified by -ExportPath. Overrides -ExportFormat if both are specified.
    • Expected Type: SwitchParameter (no value needed).
    • Default: False (no HTML export).
    • Example: -ExportHTML.
  • -NoElevation (Optional, Switch):

    • Description: Runs the script without requiring administrative privileges. Some checks (e.g., TPM, Secure Boot) may be limited or skipped if elevation is not available.
    • Expected Type: SwitchParameter (no value needed).
    • Default: False (attempts elevated checks).
    • Example: -NoElevation.

Output

  • Console: Color-coded report with:
    • Requirement headers (e.g., "CPU Check", "TPM Check").
    • Status indicators and details (e.g., "TPM: 2.0 - Compatible").
    • Summary (e.g., "7/8 Requirements Met").
  • File Export (with -ExportResults or -ExportHTML): Results in CSV, XML, JSON, or HTML format, with columns/fields for Requirement, Status, Details, and Recommendation.
  • Exit Code: 0 (fully compatible), 1 (issues detected).

No system changes are made.

Error Handling and Known Issues

  • Errors:

    • Permission Denied (TPM/Secure Boot): Run as Administrator or use -NoElevation:
      Start-Process powershell -Verb RunAs -ArgumentList "-File .\Test-Win11Compatibility.ps1"
    • WMI/CIM Failure: Ensure WMI service is running:
      Restart-Service Winmgmt
    • Old Windows Version: Update to Windows 10 2004+ if warnings appear.
  • Issues:

    • Virtual machines may misreport TPM/Secure Boot; verify in host BIOS/UEFI.
    • ARM64 systems (e.g., Surface Pro X) may show false negatives.
    • DirectX check failures? Confirm with dxdiag.
  • Troubleshooting:

    1. Check execution policy: Get-ExecutionPolicy.
    2. Test cmdlets: Get-Tpm, Get-CimInstance Win32_OperatingSystem.
    3. Review Event Logs (Event Viewer > Windows Logs > System).
    4. Report issues at GitHub Issues.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/new-check).
  3. Commit changes (git commit -m "Add new check").
  4. Push to the branch (git push origin feature/new-check).
  5. Open a pull request.

See CONTRIBUTING.md for details.

License

MIT License

Copyright (c) 2025 Ndomako

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author

  • Ndomako (GitHub) - Creator and maintainer.

For questions or feedback, open a discussion at GitHub Discussions.


Last Updated: October 20, 2025

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages