File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
powershell-adapter/psDscAdapter Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ function Invoke-DscCacheRefresh {
53
53
$Modules += Get-Module - Name $m - ListAvailable
54
54
}
55
55
}
56
- elseif (' PSDesiredStateConfiguration' -eq $module ) {
56
+ elseif (' PSDesiredStateConfiguration' -eq $module -and $PSVersionTable.PSVersion.Major -le 5 ) {
57
+ # the resources in Windows should only load in Windows PowerShell
57
58
# workaround: the binary modules don't have a module name, so we have to special case File and SignatureValidation resources that ship in Windows
58
59
$DscResources = Get-DscResource | Where-Object { $_.modulename -eq ' PSDesiredStateConfiguration' -or ( $_.modulename -eq $null -and $_.parentpath -like " $env: windir \System32\Configuration\*" ) }
59
60
}
You can’t perform that action at this time.
0 commit comments