Get-SqlSafe Version Summary
===========================

Purpose
-------
This package provides a small PowerShell sample that builds an HTML SQL Server
version summary from reports generated by Get-SqlSafe Community Edition.

The summary groups assessed SQL Server instances by SQL Server version and
provides links back to the corresponding individual reports. It is intended as
a lightweight estate overview, not as a replacement for a maintained inventory
or configuration management database.


Package contents
----------------
New-GetSqlSafeVersionSummary.ps1
    Parses Get-SqlSafe HTML reports and creates the version summary.

README.txt
    This file.

Get-SqlSafe.ps1 is not included in this package. Download the current Community
Edition separately from:

https://sarpedonqualitylab.us/resources/


Before you begin
----------------
1. Review the PowerShell script before running it.
2. Use reports only from systems you are authorized to assess.
3. Start with copies of a few known reports and verify the generated summary.
4. Protect the reports and summary according to the sensitivity of the
   environment they describe.

If Windows marks the downloaded script as blocked, review it first and then
unblock only the file you trust. Do not weaken the system-wide PowerShell
execution policy to run this sample.


Setup
-----
1. Extract this package to a working folder.
2. Place the individual Get-SqlSafe HTML reports in a Results subfolder, or
   choose another folder and supply it with -ReportFolder.
3. Keep the generated summary in a location from which its relative links to
   the individual reports remain valid.

The script scans HTML files in the selected folder. Files that do not contain
the Get-SqlSafe System Overview section are ignored.


Run
---
To use the default Results folder and output filename, open PowerShell in the
working folder and run:

    .\New-GetSqlSafeVersionSummary.ps1

To specify the report folder and output path:

    .\New-GetSqlSafeVersionSummary.ps1 `
        -ReportFolder .\Results `
        -HtmlOutputPath .\Get-SqlSafe_VersionSummary.html

Relative paths are resolved from the script folder.


Results
-------
The generated HTML page contains:

- The number of parsed reports.
- The number of distinct SQL Server versions.
- One summary card for each SQL Server version.
- The corresponding SQL Server instances within each card.
- A table with links to the individual Get-SqlSafe reports.

The default output filename is:

    Get-SqlSafe_VersionSummary_yyyyMMdd.html


Sensitive information
---------------------
The generated summary can contain SQL Server instance names, source-folder
paths, version information, and links to detailed assessment reports. The
individual reports can also contain database names, account names, and details
about security weaknesses.

Review and sanitize all output before sharing or publishing it. Do not publish
reports from a real environment without authorization.


Scope and limitations
---------------------
This script extracts only the target server name, SQL Server version, and
report-file path. It does not aggregate security findings, warning or failure
counts, database counts, login counts, clustering status, or Availability Group
information.

The parser expects the System Overview section in generated Get-SqlSafe HTML to
use data-check-id="800" and the current two-column row structure. If the report
format changes, the extraction logic may also need to change. This is a focused
parser for predictable Get-SqlSafe output, not a general-purpose HTML parser.


License
-------
This script is sample code and is not part of the official Get-SqlSafe Community
Edition release. You may copy and adapt it for internal use if the notice in the
script remains included.

Redistribution, resale, or inclusion in another product requires prior written
permission from Sarpedon Quality Lab. Get-SqlSafe Community Edition may have
separate license terms; retain its copyright and license notices.
