We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 098b3c1 commit 0df185aCopy full SHA for 0df185a
powershell-adapter/psDscAdapter/psDscAdapter.psm1
@@ -484,8 +484,16 @@ function Invoke-DscOperation {
484
$addToActualState.properties = [psobject]@{'InDesiredState'=$Result}
485
}
486
'Export' {
487
- $t = $dscResourceInstance.GetType()
488
- $method = $t.GetMethod('Export')
+ $methods = $t.GetMethods() | Where-Object { $_.Name -eq 'Export' }
+ $method = foreach ($m in $methods)
489
+ {
490
+ if ($m.GetParameters().Count -eq 0)
491
492
+ $m
493
+ break
494
+ }
495
496
+
497
if ($null -eq $method) {
498
"Export method not implemented by resource '$($DesiredState.Type)'" | Write-DscTrace -Operation Error
499
exit 1
0 commit comments