Cmdlet Reference
This document covers the custom PowerShell functions provided by the core modules.
ConfigManager Module
Export-SolutionConfig
Generates a solution-specific JSON configuration file from the master environment.
Export-SolutionConfig [-Solution] <string> [-MasterConfigPath <string>] [-OutputPath <string>]Parameters
| Parameter | Type | Description |
|---|---|---|
-Solution | string | Solution name: vmfleet, fio, iperf, hammerdb, stress-ng |
-MasterConfigPath | string | Path to variables.yml (default: config/variables/variables.yml) |
-OutputPath | string | Output path for generated JSON (default: config/variables/solutions/{solution}.json) |
Get-ConfigValue
Retrieves a configuration value with override chain support.
Get-ConfigValue [-Name] <string> [-Solution <string>] [-DefaultValue <object>] [-Override <object>]Logger Module
Write-Log
Writes a structured log entry to the component log file.
Write-Log [-Message] <string> [-Severity <string>] [-Component <string>] [-Data <hashtable>]Severity Levels
DEBUG— Detailed diagnostic informationINFO— General operational messagesWARNING— Potential issues that don't stop executionERROR— Failures that affect the current operationCRITICAL— Fatal errors requiring immediate attention
Start-LogSession / Stop-LogSession
Manages log session lifecycle with correlation IDs.
$sessionId = Start-LogSession -Component "VMFleet" -RunId "run-001"
# ... operations ...
Stop-LogSession -SessionId $sessionIdStateManager Module
New-RunState
Creates a new run state file for tracking automation progress.
New-RunState [-RunId] <string> [-Phases <string[]>]Update-RunPhase
Updates the status of a specific phase in the run state.
Update-RunPhase [-RunId] <string> [-Phase] <string> [-Status] <string> [-Details <hashtable>]Phase Statuses
pending— Not yet startedrunning— Currently executingcompleted— Successfully finishedfailed— Encountered an errorskipped— Intentionally bypassed
Test-PhaseCompleted
Checks if a phase has already completed (for resume support).
Test-PhaseCompleted [-RunId] <string> [-Phase] <string>CredentialManager Module
Get-ManagedCredential
Retrieves a credential from a parameter, an environment variable or Azure Key Vault. Never prompts.
Get-ManagedCredential [-Name] <string> [-Source <string>] [-Credential <PSCredential>] [-Username <string>] [-VaultConfigPath <string>] [-ProjectRoot <string>]Credential Sources
Auto(default) —-Credentialwhen passed, then<NAME>_USERNAME/<NAME>_PASSWORD, then Key Vault; stops with a message when none has a valueKeyVault— Retrieve from Azure Key VaultEnvironment— Read<NAME>_USERNAMEand<NAME>_PASSWORDParameter— Expect credential passed as parameter
MonitoringManager Module
Start-MetricCollection
Begins background metric collection for the specified categories.
Start-MetricCollection [-Categories <string[]>] [-SampleIntervalSeconds <int>] [-OutputPath <string>]Stop-MetricCollection
Stops background metric collection and finalizes output files.
Stop-MetricCollection [-CollectionId] <string>ReportGenerator Module
New-TestReport
Generates test reports in the specified formats.
New-TestReport [-RunId] <string> [-ResultsPath <string>] [-OutputPath <string>]
[-Formats <string[]>] [-IncludeMetrics] [-ClusterConfig <string>]