Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions source/Public/Compare-DscParameterState.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
}
}
Expand Down
4 changes: 1 addition & 3 deletions source/Public/Find-Certificate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion source/Public/Get-LocalizedDataForInvariantCulture.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function Get-LocalizedDataForInvariantCulture
}
else
{
Write-Verbose -Message ('Getting file {0}' -f $languageFile)
Write-Debug -Message ('Getting file {0}' -f $languageFile)
Comment thread
johlju marked this conversation as resolved.
}

$constrainedState = [System.Management.Automation.Runspaces.InitialSessionState]::Create()
Expand Down
2 changes: 1 addition & 1 deletion source/Public/Test-IsNanoServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
6 changes: 3 additions & 3 deletions source/Public/Test-ModuleExist.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'."
Comment thread
johlju marked this conversation as resolved.

$modulesToEvaluate = $availableModules |
Where-Object -FilterScript {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down