We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent47c0d4f commit00d97b2Copy full SHA for 00d97b2
powershell-adapter/psDscAdapter/win_psDscAdapter.psm1
@@ -225,7 +225,9 @@ function Invoke-DscCacheRefresh {
225
226
# workaround: Use GetTypeInstanceFromModule to get the type instance from the module and validate if it is a class-based resource
227
$classBased= GetTypeInstanceFromModule-modulename$moduleName-classname$dscResource.Name-ErrorAction Ignore
228
-if (-not ([string]::IsNullOrEmpty($classBased))) {
+if ($classBased-and ($instance.GetProperties()|Where-Object {
229
+$_.CustomAttributes.AttributeType.Name-eq'DscPropertyAttribute' }|Select-Object-First1)) {
230
+"Detected class-based resource:$($dscResource.Name) => Type:$($classBased.BaseType.FullName)"|Write-DscTrace
231
$dscResourceInfo.ImplementationDetail='ClassBased'
232
}
233