Get-DscConfiguration is very particular about the data type that is returned. In the MOF String LogCustomFields is defined as an array, but if $website.logFile.customFields.Collection is $null, then $null is being included in the Get return, which is not the same as an empty array. $cimLogCustomFields should be casted as an array.
Get-DscConfiguration is very particular about the data type that is returned. In the MOF String LogCustomFields is defined as an array, but if $website.logFile.customFields.Collection is $null, then $null is being included in the Get return, which is not the same as an empty array. $cimLogCustomFields should be casted as an array.