Configuration

Set-sqmConfig

Persists one or more sqmSQLTool module configuration values — log path, output path, Ola job names, TSM management classes, HPU domain group map, SSRS installer path, and more — to a JSON file in the user profile. Read back at runtime by Get-sqmConfig.

Module: sqmSQLTool
Requires: none
ShouldProcess: No
Output: PSCustomObject

Execution Flow

START Load existing config JSON from user profile (or start empty) Validate each supplied path (existence or creatability) foreach supplied parameter Merge value into config object (overwrite existing key) Save config as JSON to %USERPROFILE%\.sqmSQLTool\config.json Return PSCustomObject (saved config) DONE
Only supplied parameters overwrite existing values — unspecified keys are preserved from the current config. Read the active configuration with Get-sqmConfig. The config file is stored per-user in %USERPROFILE%\.sqmSQLTool\config.json.

Parameters

ParameterTypeRequiredDescription
-LogPathStringOptionalDirectory for log files used by Invoke-sqmLogging.
-OutputPathStringOptionalDefault output directory for reports.
-CentralPathStringOptionalOptional central storage for additional report copies.
-OlaJobNameFullStringOptionalName of the Ola FULL backup job for user databases.
-OlaJobNameDiffStringOptionalName of the Ola DIFF backup job for user databases.
-OlaJobNameLogStringOptionalName of the Ola LOG backup job for user databases.
-OlaJobNameIndexOptStringOptionalName of the Ola IndexOptimize job.
-OlaJobNameIntUserDbStringOptionalName of the Ola IntegrityCheck (user databases) job.
-OlaJobNameIntSysDbStringOptionalName of the Ola IntegrityCheck (system databases) job.
-OlaJobNameSysDbBackupStringOptionalName of the Ola system database FULL backup job.
-TsmManagementClassesString[]OptionalValid TSM management class names (e.g. MC_B_NL.NL_42.42.NA).
-HpuDomainGroupMapPSCustomObject[]OptionalArray of {DomainPattern, GroupNamePattern} objects evaluated in order by Get-sqmHpuAllowGroup.
-SsrsInstallerPathStringOptionalUNC or local path to the SSRS installer, used as default by Install-sqmSsrsReportServer.

Return Value

Returns a PSCustomObject representing the full saved configuration after applying the supplied changes.

Examples

Example 1 — Set log and output paths

Set-sqmConfig -LogPath "C:\Logs\sqmSQLTool" -OutputPath "C:\Reports"

Example 2 — Override Ola job names

Set-sqmConfig -OlaJobNameFull "OlaHH-FULL" -OlaJobNameLog "OlaHH-LOG"

Example 3 — Configure HPU domain group mapping

Set-sqmConfig -HpuDomainGroupMap @(
    [PSCustomObject]@{ DomainPattern = 'firma.de';   GroupNamePattern = 'Fg_DC_AllowAudit_Mod' },
    [PSCustomObject]@{ DomainPattern = '*';           GroupNamePattern = 'Rg_DC_AllowAudit_Mod' }
)