Commands / Get-sqmAutoGrowthReport
Get-sqmAutoGrowthReport
PerformancesqmSQLTool v1.8.2+ · File Analysis✓ Warning Detection
Analyzes AutoGrowth settings on all data and log files across databases. Flags misconfigurations including: percent-based growth, growth increments that are too small (<10%), unbounded/unlimited log files, and growth values exceeding recommended thresholds. Returns detailed report with severity levels and remediation suggestions.

Parameters

ParameterTypeRequiredDefaultNotes
-SqlInstancestringOptional$env:COMPUTERNAMETarget SQL Server instance.
-SqlCredentialPSCredentialOptionalCredentials for the connection.
-Databasestring[]OptionalAll user DBsTarget databases (name or wildcard pattern).
-IncludeSystemswitchSwitch$falseAlso include system databases (master, model, msdb).
-DetailedswitchSwitch$falseInclude additional file properties (physical path, file ID).
-EnableExceptionswitchSwitch$falseRe-throw exceptions immediately.

Execution Flow

START dbatools available? NO throw: dbatools not found YES Connect to instance and retrieve database list Filter: system/user databases, apply -Database wildcard foreach $db in $databases Get all database files: data + log via sys.master_files Retrieve: file size, growth setting (MB/%), max size File type, physical path (-Detailed) VALIDATION CHECKS • Is growth PERCENT-based? (Flag: should be fixed MB) • Is growth too small? (<10 MB or <10%: flag) • Is growth too large? (>100 MB: flag) • Is max size unlimited (0)? (Log files: flag) Assign severity: OK / Warning / Critical Build result object per file Database, FileName, FileType, CurrentSize, Growth(MB/%), MaxSize, Severity, Recommendation, PhysicalPath (-Detailed) Return [PSCustomObject[]] all file analysis results Sorted by Database, then by Severity (Critical first) DONE

Examples

Generate AutoGrowth report for all databases
Get-sqmAutoGrowthReport -SqlInstance "SQL01"
Report including system databases and physical paths
Get-sqmAutoGrowthReport -SqlInstance "SQL01" -IncludeSystem -Detailed | Where-Object Severity -eq "Critical"