Cannot load PSDscResources when using composite resources

This topic contains 1 reply, has 2 voices, and was last updated by  Adam 2 weeks, 1 day ago.

  • Author
    Posts
  • #76448

    Sylvain Martel
    Participant

    When using composite resources, it becomes impossible to use PSDscResources, as it refuses to import. Worse, it's presence alone prevent the configuration from being run, thus making it impossible to create any mof

    The error given is:

    ImportClassResourcesFromModule : Exception calling "ImportClassResourcesFromModule" with "3" argument(s): "Resource name 'WindowsPackageCab' is already being used by another Resource or
    Configuration."
    At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2109 char:35
    + ... rcesFound = ImportClassResourcesFromModule -Module $mod -Resources $r ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [ImportClassResourcesFromModule], MethodInvocationException
    + FullyQualifiedErrorId : PSInvalidOperationException,ImportClassResourcesFromModule

    I've opened an issue on Github, but maybe someone here has a clue about this problem?

    The problem arise as soon as you import a composite resource inside a configuration and have PsDscResources 2.8.0.0 installed.

  • #76495

    Adam
    Participant

    I have exactly the same problem and so far I had no luck with resolving it.

You must be logged in to reply to this topic.