I created a very basic DscResource and it successfully running the Get method. For testing purposes I defined Test method like that:
[bool] Test() {
return $true
}
but every time that I invoke this method running:
Invoke-DscResource ... -Method Test
the output is error:
OperationStopped: Serialized XML is nested too deeply. Line 1, position 3459.
but actually in Event viewer the operation completed successfully:
[
{"time": "2024-02-06T13:03:11.076+02:00", "type": "verbose", "message": "[QUICK-DEV]: LCM: [ Start Test ] [[VmFirewall]DirectResourceAccess] "},
{"time": "2024-02-06T13:03:11.155+02:00", "type": "verbose", "message": "[QUICK-DEV]: LCM: [ End Test ] [[VmFirewall]DirectResourceAccess] True in 0.0790 seconds."},
{"time": "2024-02-06T13:03:11.155+02:00", "type": "verbose", "message": "[QUICK-DEV]: LCM: [ End Set ] in 0.2200 seconds."}
]
Why this message Serialized XML is nested too deeply appear ? and what I can do about it ?
It seems like a bug in Powershell... Everything working as expected if I use Windows Powershell but it fails with error if I user Powershell Core.... So strange...