Publishing DSC resources to local PSGallery

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

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.

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

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

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

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.

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?

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