diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e234c8..075100f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- `Compare-DscParameterState` + - Changed detailed diagnostic messages from `Write-Verbose` to `Write-Debug` + for variable values, type comparisons, and internal diagnostics. + - Comparison result still uses `Write-Verbose` to provide user-actionable + information about parameter state differences. +- `Test-ModuleExist` + - Changed module filtering messages from `Write-Verbose` to `Write-Debug` + for internal implementation details. +- `Test-IsNanoServer` + - Changed operating system SKU diagnostic message from `Write-Verbose` to `Write-Debug`. +- `Find-Certificate` + - Changed certificate filter diagnostic message from `Write-Verbose` to `Write-Debug`. +- `Get-LocalizedDataForInvariantCulture` + - Changed file processing message from `Write-Verbose` to `Write-Debug` + for internal diagnostic information. + ## [0.24.1] - 2025-08-27 ### Added diff --git a/source/Public/Compare-DscParameterState.ps1 b/source/Public/Compare-DscParameterState.ps1 index 9dd41b6..f2ce244 100644 --- a/source/Public/Compare-DscParameterState.ps1 +++ b/source/Public/Compare-DscParameterState.ps1 @@ -309,7 +309,7 @@ function Compare-DscParameterState # This is a credential object. Compare only the user name if ($currentType.Name -eq 'PSCredential' -and $currentValue.UserName -eq $desiredValue.UserName) { - Write-Verbose -Message ($script:localizedData.MatchPsCredentialUsernameMessage -f $currentValue.UserName, $desiredValue.UserName) + Write-Debug -Message ($script:localizedData.MatchPsCredentialUsernameMessage -f $currentValue.UserName, $desiredValue.UserName) continue # pass to the next key } elseif ($currentType.Name -ne 'string') @@ -321,7 +321,7 @@ function Compare-DscParameterState # Assume the string is our username when the matching desired value is actually a credential if ($currentType.Name -eq 'string' -and $currentValue -eq $desiredValue.UserName) { - Write-Verbose -Message ($script:localizedData.MatchPsCredentialUsernameMessage -f $currentValue, $desiredValue.UserName) + Write-Debug -Message ($script:localizedData.MatchPsCredentialUsernameMessage -f $currentValue, $desiredValue.UserName) continue # pass to the next key } else @@ -352,7 +352,7 @@ function Compare-DscParameterState #region Check if the value of Current and desired state is the same but only if they are not an array if ($currentValue -eq $desiredValue -and -not $desiredType.IsArray) { - Write-Verbose -Message ($script:localizedData.MatchValueMessage -f $desiredType.FullName, $key, $currentValue, $desiredValue) + Write-Debug -Message ($script:localizedData.MatchValueMessage -f $desiredType.FullName, $key, $currentValue, $desiredValue) continue # pass to the next key } #endregion check same value @@ -368,18 +368,18 @@ function Compare-DscParameterState # if there no key, don't need to check if (-not $checkDesiredValue) { - Write-Verbose -Message ($script:localizedData.MatchValueMessage -f $desiredType.FullName, $key, $currentValue, $desiredValue) + Write-Debug -Message ($script:localizedData.MatchValueMessage -f $desiredType.FullName, $key, $currentValue, $desiredValue) continue # pass to the next key } #endregion #region Check if desired type is array, if no Hashtable and current type hashtable to if ($desiredType.IsArray -or $desiredType.ImplementedInterfaces -contains [System.Collections.IList]) { - Write-Verbose -Message ($script:localizedData.TestDscParameterCompareMessage -f $key, $desiredType.FullName) + Write-Debug -Message ($script:localizedData.TestDscParameterCompareMessage -f $key, $desiredType.FullName) # Check if the currentValues and desiredValue are empty array. if (-not $currentValue -and -not $desiredValue) { - Write-Verbose -Message ($script:localizedData.MatchValueMessage -f $desiredType.FullName, $key, 'empty array', 'empty array') + Write-Debug -Message ($script:localizedData.MatchValueMessage -f $desiredType.FullName, $key, 'empty array', 'empty array') continue } elseif (-not $currentValue) @@ -510,7 +510,7 @@ function Compare-DscParameterState } else { - Write-Verbose -Message ($script:localizedData.MatchElementValueMessage -f $i, $desiredType.FullName, $key, $currentArrayValues[$i], $desiredArrayValues[$i]) + Write-Debug -Message ($script:localizedData.MatchElementValueMessage -f $i, $desiredType.FullName, $key, $currentArrayValues[$i], $desiredArrayValues[$i]) continue } } diff --git a/source/Public/Find-Certificate.ps1 b/source/Public/Find-Certificate.ps1 index 48b0c7c..c6f4a2a 100644 --- a/source/Public/Find-Certificate.ps1 +++ b/source/Public/Find-Certificate.ps1 @@ -176,9 +176,7 @@ function Find-Certificate # Join all the filters together $certFilterScript = '(' + ($certFilters -join ' -and ') + ')' - Write-Verbose ` - -Message ($script:localizedData.SearchingForCertificateUsingFilters -f $store, $certFilterScript) ` - -Verbose + Write-Debug -Message ($script:localizedData.SearchingForCertificateUsingFilters -f $store, $certFilterScript) $certs = Get-ChildItem -Path $certPath | Where-Object -FilterScript ([ScriptBlock]::Create($certFilterScript)) diff --git a/source/Public/Get-LocalizedDataForInvariantCulture.ps1 b/source/Public/Get-LocalizedDataForInvariantCulture.ps1 index 162db08..34c8f0b 100644 --- a/source/Public/Get-LocalizedDataForInvariantCulture.ps1 +++ b/source/Public/Get-LocalizedDataForInvariantCulture.ps1 @@ -136,7 +136,7 @@ function Get-LocalizedDataForInvariantCulture } else { - Write-Verbose -Message ('Getting file {0}' -f $languageFile) + Write-Debug -Message ('Getting file {0}' -f $languageFile) } $constrainedState = [System.Management.Automation.Runspaces.InitialSessionState]::Create() diff --git a/source/Public/Test-IsNanoServer.ps1 b/source/Public/Test-IsNanoServer.ps1 index 0991d47..f6db70a 100644 --- a/source/Public/Test-IsNanoServer.ps1 +++ b/source/Public/Test-IsNanoServer.ps1 @@ -25,7 +25,7 @@ function Test-IsNanoServer $operatingSystemSKU = (Get-CimInstance -ClassName Win32_OperatingSystem).OperatingSystemSKU - Write-Verbose -Message ($script:localizedData.TestIsNanoServerOperatingSystemSku -f $operatingSystemSKU) + Write-Debug -Message ($script:localizedData.TestIsNanoServerOperatingSystemSku -f $operatingSystemSKU) return ($operatingSystemSKU -in ($productDatacenterNanoServer, $productStandardNanoServer)) } diff --git a/source/Public/Test-ModuleExist.ps1 b/source/Public/Test-ModuleExist.ps1 index 85ad92c..2127006 100644 --- a/source/Public/Test-ModuleExist.ps1 +++ b/source/Public/Test-ModuleExist.ps1 @@ -103,7 +103,7 @@ function Test-ModuleExist if ($modulePath) { - Write-Verbose -Message "Filtering modules by path '$modulePath'." + Write-Debug -Message "Filtering modules by path '$modulePath'." $modulesToEvaluate = $availableModules | Where-Object -FilterScript { @@ -119,7 +119,7 @@ function Test-ModuleExist { $moduleVersion, $modulePrerelease = $Version -split '-' - Write-Verbose -Message "Filtering modules by version '$moduleVersion'." + Write-Debug -Message "Filtering modules by version '$moduleVersion'." $modulesToEvaluate = $modulesToEvaluate | Where-Object -FilterScript { @@ -128,7 +128,7 @@ function Test-ModuleExist if ($modulesToEvaluate -and $modulePrerelease) { - Write-Verbose -Message "Filtering modules by prerelease '$modulePrerelease'." + Write-Debug -Message "Filtering modules by prerelease '$modulePrerelease'." $modulesToEvaluate = $modulesToEvaluate | Where-Object -FilterScript {