The Test-TargetResource will always fail if the current state has only defined one WinHttpDefaultSecureProtocols, e.g. 'TLS1.2'. This is because Get-TargetResource does not return a string array for the property WinHttpDefaultSecureProtocols resulting in that Test-TargetResource compares the array @('TLS1.2') against @('T','L','S','1','.','2').
Verbose logs
Not available (debugged but forgot to save the logs)
Problem description
The
Test-TargetResource
will always fail if the current state has only defined oneWinHttpDefaultSecureProtocols
, e.g. 'TLS1.2'. This is because Get-TargetResource does not return a string array for the propertyWinHttpDefaultSecureProtocols
resulting in thatTest-TargetResource
compares the array@('TLS1.2')
against@('T','L','S','1','.','2')
.Verbose logs
DSC configuration
Suggested solution
Convert the value:.
https://github.com/dsccommunity/SChannelDsc/blob/b029a1f4b7e7b96ed0f65dc4ee697a943b55df5b/source/DSCResources/MSFT_SChannelSettings/MSFT_SChannelSettings.psm1#L326
to an array
Operating system the target node is running
PowerShell version and build the target node is running
SChannelDsc version