Publishing DSC resources to local PSGallery

This topic contains 7 replies, has 3 voices, and was last updated by  Aurimas N. 6 months, 3 weeks ago.

  • Author
  • #83161

    Aurimas N.

    how do I publish dsc resources to local psgallery so I can find them with find-dscresource?
    I was not able to do that with publish-module, must be missing something:

    1. I've created class based dsc resource as described here: (basically copy pasted the resource for testing)
    2. Verified locally that the dsc resource is available via


    3. Published it to local PS repository

    Publish-Module -Name FileResource -Repository 'localpsrepo' -NuGetApiKey mykey

    Find-Module -Repository 'localpsrepo' lists FileResource module
    Find-DSCResource -Repository 'localpsrepo' lists no results

  • #83219

    Jeremy Murrah

    Maybe something in your manifest metadata that it doesn't like? Try publishing one of the "official" dsc resource modules to your repository, like xPSDesiredStateConfiguration, see if you can find that once it's published.

  • #83224

    Aurimas N.

    I have already tried few modules I've saved from PSGallery, the result is the same, module is listed, but not the dsc resources.

  • #83243

    Aurimas N.

    Just tried it with, same result, either I'm repeating same mistake, or this is just not working with private/internal nuget repositories?

  • #83258

    J. Keith Bankston

    In the PS Gallery this works based on either the tag: DSCResource or DSC.
    Please check to see if you have the latest version of PowerShellGet from the PowerShell Gallery, as we made changes a while ago to make this work seamlessly. The current version will extract those tags from PrivateData\PsData section of the module manifest, and feed it to the NuGet client automatically.
    You can try specifying these tags using Publish-Module ... -Tags DSCResource,DSC
    If that doesn't work, please report this as an issue in We'll need the following info:
    get-module powershellget -li

    • #83270

      Aurimas N.

      I have updated powershellget to, tried to publish-module with -tags DSC,DSCResource the result was the same.
      On another note, Find-DSCResource lists dsc resources if I specify the -modulename parameter.

  • #83272

    Jeremy Murrah

    So for reference I use an internal repository server I created using the nuget dsc module. Very barebones but I'm able to publish and find dsc resources on that server with no issue. Maybe give that one a try and see if you have the same issue?

  • #83470

    Aurimas N.

    Got an answer on github that myget does not tag based searches, I guess same goes for artifactory.

You must be logged in to reply to this topic.