xDscDiagnostics icon indicating copy to clipboard operation
xDscDiagnostics copied to clipboard

Split-SingleDscGroupedRecord - ContainerLog values have changed case on Windows 10 hence all calls to EndsWith Fail

Open hansze opened this issue 7 years ago • 0 comments

Calls to Trace-xDSCOperation fail as assignment of EventType property to TraceOutput Object fails as EventType is $null.

Repro on Windows 10.0.17763

(get-winevent -LogName 'Microsoft-Windows-Dsc/Operational' -MaxEvents 5) | where-object {$_.ContainerLog.endsWith("operational")}

Suggested Fix for all calls to EndsWith to IgnoreCase

(get-winevent -LogName 'Microsoft-Windows-Dsc/Operational' -MaxEvents 5) | where-object {$_.ContainerLog.endsWith("operational",[System.StringComparison]::OrdinalIgnoreCase)}

hansze avatar Apr 12 '19 10:04 hansze