Performance

Get-sqmServerHardwareReport

Collects hardware and system configuration from one or more servers via CIM/WMI and produces a dark-theme HTML report, CSV, TXT or all three formats simultaneously.

Module: sqmSQLTool
dbatools: No
ShouldProcess: No
Pipeline: Yes (ComputerName)
Output: String (file path, -PassThru)

Execution Flow

START Resolve ReportPath (config / default) foreach ComputerName _Get-sqmHardwareData (CIM/WMI) OS · CPU · RAM · Disks · Network · SQL Services · VM Detection OutputFormat HTML/CSV/TXT/All? _Build-sqmHardwareReportHtml CSV flat export TXT report Copy-sqmToCentralPath · Invoke-Item (HTML) -PassThru? Yes return path DONE Report sections: OS · Processor · RAM (DIMM) · Physical Disks · Logical Drives (space bars) · Network · SQL Instances · VM badge
No WinRM / PowerShell Remoting required for remote servers — uses DCOM/WMI (port 135 + dynamic ports). SQL instances are discovered via Win32_Service, no SQL connection needed.

Parameters

ParameterTypeRequiredDescription
-ComputerNameString[]OptionalOne or more target servers. Aliases: SqlInstance, ServerName. Pipeline-capable. Default: local computer.
-ReportPathStringOptionalOutput directory. Defaults to Get-sqmConfig 'OutputPath'\HardwareReports or %ProgramData%\sqmSQLTool\HardwareReports.
-OutputFormatStringOptionalHTML (default), CSV, TXT, or All. Multiple formats created when All is used.
-NoOpenSwitchOptionalSuppress automatic browser launch for the HTML report.
-PassThruSwitchOptionalReturn the full path(s) of created file(s) as strings.
-EnableExceptionSwitchOptionalThrow exceptions instead of using Write-Error.

Report Sections

SectionDetails
Summary cardsTotal RAM (with usage bar), CPU Cores/Logical, Physical Disk count, SQL Instance count, VM type badge
Operating SystemOS caption, version/build, manufacturer/model, domain, last boot, uptime
ProcessorModel, socket count, physical/logical cores per socket, max clock speed
RAMTotal/free memory, usage bar, DIMM slot count + per-DIMM: capacity, speed, type (DDR3/4/5)
Physical DisksDisk#, model, size, type (SSD/HDD via MSFT_PhysicalDisk), interface, serial, partition count, drive letters (SHARED badge if >1)
Logical DrivesDrive letter, label, filesystem, total/used/free, usage bar with colour thresholds, extension recommendation when below threshold
NetworkAdapter description, IPv4 addresses, MAC, DNS servers, gateway
SQL InstancesInstance name, service name, running status badge, start mode (via Win32_Service)

Return Value

No pipeline output by default. With -PassThru, returns the full file path(s) as [string]. Files are also copied to the central share via Copy-sqmToCentralPath.

Examples

Example 1 — Local server (HTML, opens in browser)

Get-sqmServerHardwareReport

Example 2 — Remote server, return path

$path = Get-sqmServerHardwareReport -ComputerName "SQL01" -NoOpen -PassThru

Example 3 — Multiple servers, custom path

Get-sqmServerHardwareReport -ComputerName "SQL01","SQL02","SQL03" -ReportPath "C:\Reports" -NoOpen

Example 4 — CSV export for Excel

Get-sqmServerHardwareReport -ComputerName "SQL01","SQL02" -OutputFormat CSV -NoOpen

Example 5 — All formats at once

Get-sqmServerHardwareReport -ComputerName "SQL01" -OutputFormat All -NoOpen -PassThru

Example 6 — Pipeline input

"SQL01","SQL02" | Get-sqmServerHardwareReport -NoOpen