PSDesiredStateConfiguration icon indicating copy to clipboard operation
PSDesiredStateConfiguration copied to clipboard

CmdletsToExports causes Get-DscResource to not return resources

Open ThomasNieto opened this issue 1 year ago • 1 comments

Prerequisites

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

Steps to reproduce

I am using the NewFile example on the docs to test this. If the module manifest has CmdletsToExport key defined then Get-DscResource will not return any resources for that module.

Expected behavior

# Resources returned

Actual behavior

# No resources are 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.0-beta1

Visuals

No response

ThomasNieto avatar Mar 08 '23 21:03 ThomasNieto

To concur with @ThomasNieto, here are some tests I've made: image

I know it's a known issue because I remember the workaround was mentioned to the config team a year or two ago... I can't find trace of an issue though (thanks @ThomasNieto).

gaelcolas avatar Mar 17 '23 14:03 gaelcolas