This topic contains 7 replies, has 3 voices, and was last updated by
October 28, 2017 at 12:19 pm #83161
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: https://docs.microsoft.com/en-us/powershell/dsc/authoringresourceclass (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
October 30, 2017 at 12:22 pm #83219ParticipantPoints: 1Rank: Member
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.
October 30, 2017 at 1:40 pm #83224
I have already tried few modules I've saved from PSGallery, the result is the same, module is listed, but not the dsc resources.
October 30, 2017 at 5:08 pm #83243
Just tried it with MyGet.org, same result, either I'm repeating same mistake, or this is just not working with private/internal nuget repositories?
October 30, 2017 at 7:52 pm #83258ParticipantPoints: 0Rank: Member
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 github.com/powershell/powershellget. We'll need the following info:
get-module powershellget -li
October 31, 2017 at 11:03 am #83270
I have updated powershellget to 220.127.116.11, 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.
October 31, 2017 at 12:11 pm #83272
November 2, 2017 at 12:36 pm #83470
Got an answer on github that myget does not tag based searches, I guess same goes for artifactory.
The topic ‘Publishing DSC resources to local PSGallery’ is closed to new replies.