Configuration

New-sqmSetupReport

Builds a self-contained, animated HTML replay of a multi-step setup operation from a JSON-Lines event file written by Write-sqmSetupEvent. The output includes a phase pipeline, an SVG step visualizer, and a play/pause/scrub player — all embedded in a single HTML file with no external dependencies.

Module: sqmSQLTool
Requires: none
ShouldProcess: No
Output: String (path)

Execution Flow

START -EventPath file exists? return $null Yes foreach line in EventPath ConvertFrom-Json → validate, collect valid events Valid events found? return $null Yes Build self-contained HTML: phase pipeline, SVG visualizer, play/pause/scrub player, all CSS + JS embedded Write HTML to OutputPath (default: EventPath.html) Return output file path (String) DONE
This is an internal helper function — it is called by functions that accept an -EventLog switch (e.g. New-sqmAvailabilityGroup) via Write-sqmSetupEvent. The SVG step visualizer supports render types: flow-arrows, disk-format, node-restart, data-replicate, listener, gears, and a default fallback. Returns $null if the event file is missing or contains no valid JSON-Lines events.

Parameters

ParameterTypeRequiredDescription
-EventPathStringRequiredPath to the JSON-Lines event file written by Write-sqmSetupEvent.
-OutputPathStringOptionalOutput HTML file path. Default: <EventPath>.html.
-TitleStringOptionalPage title shown in the report header. Default: SQL Server Setup.
-ServerStringOptionalServer name shown in the report. Default: $env:COMPUTERNAME.

Return Value

Returns a String containing the full path to the written HTML report file, or $null if no valid events were found or the event file does not exist.

Examples

Example 1 — Build report from an event log

$reportPath = New-sqmSetupReport -EventPath "C:\Logs\ag-setup.jsonl"
Start-Process $reportPath

Example 2 — Custom title and output path

New-sqmSetupReport -EventPath "C:\Logs\ag-setup.jsonl" -OutputPath "C:\Reports\AG-Prod-Setup.html" -Title "AG-Prod Setup" -Server "SQL01"