internal/Get-MtMyCorpConfigTestSetting.ps1
|
<#
.SYNOPSIS Gets the test settings for a specific test ID from the MyCorp config. .DESCRIPTION This function retrieves the test settings for a specific test ID from the MyCorp config. It returns the settings as a hashtable, which can be used to customize the behavior of the test. .EXAMPLE $testSettings = Get-MtMyCorpConfigTestSetting -TestId 'Mt.1001' # This will return the test settings for the test with ID 'Mt.1001'. #> function Get-MtMyCorpConfigTestSetting { [CmdletBinding()] [OutputType([hashtable])] param( # The ID of the test for which to retrieve the settings. [Parameter(Mandatory = $true, Position = 0)] [string]$TestId ) # Check if the MyCorp config is loaded if (-not ($__MtSession -and $__MtSession.MyCorpConfig)) { Write-Verbose "MyCorp config not loaded. Please run Get-MtMyCorpConfig first to get config for TestId: $TestId" return $null } # Retrieve the test settings from the MyCorp config return $__MtSession.MyCorpConfig.TestSettingsHash[$TestId] } |