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 does not return resources in NestedModules #102

Open
3 tasks done
ThomasNieto opened this issue Mar 8, 2023 · 0 comments
Open
3 tasks done

Get-DscResource does not return resources in NestedModules #102

ThomasNieto opened this issue Mar 8, 2023 · 0 comments

Comments

@ThomasNieto
Copy link

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

I am using the NewFile example in the docs. If the module containing the DSC resources is changed from RootModule to NestedModules then Get-DscResource will not return the module's resources.

The docs mention that this is a valid configuration: Class-based resources

A class-based DSC Resource is defined as a PowerShell class in a module file (.psm1). The class-based DSC Resource doesn't have special requirements for where it's defined. You can define it:

In the root module, like MyModule.psm1
In a nested module, like MyDscResource.psm1

Expected behavior

# resources are returned

Actual behavior

# resources are not returned

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

3.0-beta1

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