Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-DscResource silently fails when using another module types #104

Open
3 tasks done
ThomasNieto opened this issue Apr 13, 2023 · 0 comments
Open
3 tasks done

Get-DscResource silently fails when using another module types #104

ThomasNieto opened this issue Apr 13, 2023 · 0 comments

Comments

@ThomasNieto
Copy link

ThomasNieto commented Apr 13, 2023

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

If a module containing DSC Resources requires types from another module Get-DscResource will not return those resources unless the required module has been imported first.

Install-Module AnyPackageDsc
Get-DscResource -Module AnyPackageDsc

Expected behavior

ImplementationDetail : ClassBased
ResourceType         : Package
Name                 : Package
FriendlyName         :
Module               : AnyPackageDsc
ModuleName           : AnyPackageDsc
Version              : 0.1.0
Path                 : C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackageDsc\0.1.0\AnyPackageDsc.psd1
ParentPath           : C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackageDsc\0.1.0
ImplementedAs        : PowerShell
CompanyName          :
Properties           : {Name, Provider, Version, AdditionalParameters…}

ImplementationDetail : ClassBased
ResourceType         : Source
Name                 : Source
FriendlyName         :
Module               : AnyPackageDsc
ModuleName           : AnyPackageDsc
Version              : 0.1.0
Path                 : C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackageDsc\0.1.0\AnyPackageDsc.psd1
ParentPath           : C:\Users\Thomas\Documents\PowerShell\Modules\AnyPackageDsc\0.1.0
ImplementedAs        : PowerShell
CompanyName          :
Properties           : {Location, Name, Provider, AdditionalParameters…}

Actual behavior

# no resources are returned

Error details

No response

Environment data

7.4-preview2

Version

2.0.6

Visuals

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant